* [PATCH 1/1] scsi: esas2r: esas2r_init: check return value
@ 2019-05-29 6:09 Xidong Wang
0 siblings, 0 replies; only message in thread
From: Xidong Wang @ 2019-05-29 6:09 UTC (permalink / raw)
To: James E . J . Bottomley, Martin K . Petersen
Cc: Xidong Wang, linux-scsi, linux-kernel
In esas2r_resume(), the return value of pci_enable_device() is not
checked before pdev is used.
Signed-off-by: Xidong Wang <wangxidong_97@163.com>
---
drivers/scsi/esas2r/esas2r_init.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/scsi/esas2r/esas2r_init.c b/drivers/scsi/esas2r/esas2r_init.c
index 950cd92..883d35f 100644
--- a/drivers/scsi/esas2r/esas2r_init.c
+++ b/drivers/scsi/esas2r/esas2r_init.c
@@ -686,6 +686,9 @@ 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 < 0) {
+ goto error_exit;
+ }
pci_set_master(pdev);
if (!a) {
--
2.7.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2019-05-29 6:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-29 6:09 [PATCH 1/1] scsi: esas2r: esas2r_init: check return value Xidong Wang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).