projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
841f97b
)
[SCSI] ufs: fix potential NULL pointer dereferencing error in ufshcd_prove.
author
Namjae Jeon
<
[email protected]
>
Sun, 20 May 2012 07:08:01 +0000
(
03:08
-0400)
committer
James Bottomley
<
[email protected]
>
Wed, 23 May 2012 08:29:39 +0000
(09:29 +0100)
Avoid dereferencing a NULL pointer if scsi_host_alloc is failed.
Signed-off-by: Namjae Jeon <
[email protected]
>
Signed-off-by: James Bottomley <
[email protected]
>
drivers/scsi/ufs/ufshcd.c
patch
|
blob
|
history
diff --git
a/drivers/scsi/ufs/ufshcd.c
b/drivers/scsi/ufs/ufshcd.c
index 4e010b727818cd341968bdb378a1cb3f6e544cdf..6a4fd00117ca66667173a27728b7055d2e9a5f76 100644
(file)
--- a/
drivers/scsi/ufs/ufshcd.c
+++ b/
drivers/scsi/ufs/ufshcd.c
@@
-1836,7
+1836,7
@@
ufshcd_probe(struct pci_dev *pdev, const struct pci_device_id *id)
err = pci_request_regions(pdev, UFSHCD);
if (err < 0) {
dev_err(&pdev->dev, "request regions failed\n");
- goto out_
disable
;
+ goto out_
host_put
;
}
hba->mmio_base = pci_ioremap_bar(pdev, 0);
@@
-1925,8
+1925,9
@@
out_iounmap:
iounmap(hba->mmio_base);
out_release_regions:
pci_release_regions(pdev);
-out_
disable
:
+out_
host_put
:
scsi_host_put(host);
+out_disable:
pci_clear_master(pdev);
pci_disable_device(pdev);
out_error: