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>
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;
}
}
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,