Skip to content

Commit b17884c

Browse files
Wei Yongjungregkh
authored andcommitted
staging: kpc2000: fix error return code in kp2000_pcie_probe()
Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Also removed var 'rv' since we can use 'err' instead. Fixes: 7dc7967 ("staging: kpc2000: add initial set of Daktronics drivers") Signed-off-by: Wei Yongjun <[email protected]> Cc: stable <[email protected]> Reviewed-by: Dan Carpenter <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 2ef96a5 commit b17884c

File tree

1 file changed

+4
-5
lines changed
  • drivers/staging/kpc2000/kpc2000

1 file changed

+4
-5
lines changed

drivers/staging/kpc2000/kpc2000/core.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,6 @@ static int kp2000_pcie_probe(struct pci_dev *pdev,
298298
{
299299
int err = 0;
300300
struct kp2000_device *pcard;
301-
int rv;
302301
unsigned long reg_bar_phys_addr;
303302
unsigned long reg_bar_phys_len;
304303
unsigned long dma_bar_phys_addr;
@@ -445,11 +444,11 @@ static int kp2000_pcie_probe(struct pci_dev *pdev,
445444
if (err < 0)
446445
goto err_release_dma;
447446

448-
rv = request_irq(pcard->pdev->irq, kp2000_irq_handler, IRQF_SHARED,
449-
pcard->name, pcard);
450-
if (rv) {
447+
err = request_irq(pcard->pdev->irq, kp2000_irq_handler, IRQF_SHARED,
448+
pcard->name, pcard);
449+
if (err) {
451450
dev_err(&pcard->pdev->dev,
452-
"%s: failed to request_irq: %d\n", __func__, rv);
451+
"%s: failed to request_irq: %d\n", __func__, err);
453452
goto err_disable_msi;
454453
}
455454

0 commit comments

Comments
 (0)