summaryrefslogtreecommitdiff
path: root/drivers/misc
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2021-02-03 17:42:53 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-02-04 02:48:55 +0300
commit8078efff8d4dda4a84deddcc3172b5820593147a (patch)
treedaf99fbb2c2a097f8ed33a63ff189c510612708d /drivers/misc
parent94e6a5b9e3bbb0cec6850b3662b7e3d44a008371 (diff)
downloadlinux-8078efff8d4dda4a84deddcc3172b5820593147a.tar.xz
misc: bcm-vk: Fix a couple error codes in probe()
These errors should return negative error codes instead of returning success. Fixes: 064ffc7c3939 ("misc: bcm-vk: add autoload support") Fixes: 522f692686a7 ("misc: bcm-vk: add Broadcom VK driver") Acked-by: Scott Branden <scott.branden@broadcom.com> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/YBpyEbmz00rjvT9S@mwanda Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/bcm-vk/bcm_vk_dev.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/misc/bcm-vk/bcm_vk_dev.c b/drivers/misc/bcm-vk/bcm_vk_dev.c
index c3d2bba68ef1..a82a8927d92b 100644
--- a/drivers/misc/bcm-vk/bcm_vk_dev.c
+++ b/drivers/misc/bcm-vk/bcm_vk_dev.c
@@ -1358,6 +1358,7 @@ static int bcm_vk_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
vk->bar[i] = pci_ioremap_bar(pdev, i * 2);
if (!vk->bar[i]) {
dev_err(dev, "failed to remap BAR%d\n", i);
+ err = -ENOMEM;
goto err_iounmap;
}
}
@@ -1463,7 +1464,8 @@ static int bcm_vk_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
boot_status = vkread32(vk, BAR_0, BAR_BOOT_STATUS);
if (auto_load) {
if ((boot_status & BOOT_STATE_MASK) == BROM_RUNNING) {
- if (bcm_vk_trigger_autoload(vk))
+ err = bcm_vk_trigger_autoload(vk);
+ if (err)
goto err_bcm_vk_tty_exit;
} else {
dev_err(dev,