Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1628902 > unrolled thread
| Started by | Pan Bian <bianpan2016@163.com> |
|---|---|
| First post | 2017-04-23 07:40 +0200 |
| Last post | 2017-04-23 07:40 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
[PATCH 1/1] scsi: esas2r: fix unchecked return value Pan Bian <bianpan2016@163.com> - 2017-04-23 07:40 +0200
| From | Pan Bian <bianpan2016@163.com> |
|---|---|
| Date | 2017-04-23 07:40 +0200 |
| Subject | [PATCH 1/1] scsi: esas2r: fix unchecked return value |
| Message-ID | <tzipA-4hJ-5@gated-at.bofh.it> |
Function pci_enable_device() returns a negative errno on failure, and
its return value should be validated. In function esas2r_resume(), its
return value is ignored. This patch fixes the bug.
Signed-off-by: Pan Bian <bianpan2016@163.com>
---
drivers/scsi/esas2r/esas2r_init.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/scsi/esas2r/esas2r_init.c b/drivers/scsi/esas2r/esas2r_init.c
index 6432a50..f482664 100644
--- a/drivers/scsi/esas2r/esas2r_init.c
+++ b/drivers/scsi/esas2r/esas2r_init.c
@@ -728,6 +728,8 @@ int esas2r_resume(struct pci_dev *pdev)
esas2r_log_dev(ESAS2R_LOG_INFO, &(pdev->dev),
"pci_enable_device() called");
rez = pci_enable_device(pdev);
+ if (rez)
+ goto error_exit;
pci_set_master(pdev);
if (!a) {
--
1.9.1
Back to top | Article view | linux.kernel
csiph-web