Message ID | 20201112080351.174338-1-jingxiangfeng@huawei.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | scsi: aacraid: Correct goto target in aac_resume() | expand |
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c index a3aee146537b..13323aaaa707 100644 --- a/drivers/scsi/aacraid/linit.c +++ b/drivers/scsi/aacraid/linit.c @@ -1943,7 +1943,7 @@ static int aac_resume(struct pci_dev *pdev) r = pci_enable_device(pdev); if (r) - goto fail_device; + goto fail_enable; pci_set_master(pdev); if (aac_acquire_resources(aac)) @@ -1958,9 +1958,10 @@ static int aac_resume(struct pci_dev *pdev) return 0; fail_device: + pci_disable_device(pdev); +fail_enable: printk(KERN_INFO "%s%d: resume failed.\n", aac->name, aac->id); scsi_host_put(shost); - pci_disable_device(pdev); return -ENODEV; } #endif
In current code, it jumps to call pci_disable_device() when pci_enable_device() failes to initialize device. Add a label 'fail_enable' to fix it. Fixes: de665f28f788 ("aacraid: Add Power Management support") Signed-off-by: Jing Xiangfeng <jingxiangfeng@huawei.com> --- drivers/scsi/aacraid/linit.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)