linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] [SCSI] scsi_pm: passing wrong pointer to resume()
@ 2012-05-18 14:08 Dan Carpenter
       [not found] ` <2FB252790F768E479D722B6F9B6D68C4B03E50@SCYBEXDAG02.amd.com>
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2012-05-18 14:08 UTC (permalink / raw)
  To: James E.J. Bottomley, Aaron Lu
  Cc: linux-scsi, linux-kernel, kernel-janitors, Alan Stern

This gets caught by GCC:
drivers/scsi/scsi_pm.c:30:5: warning: passing argument 1 of
	‘scsi_device_resume’ from incompatible pointer type
	[enabled by default]

It probably would have been caught in testing as well, but it's on an
error path.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
I haven't tested this.  :/  Sorry for that.

diff --git a/drivers/scsi/scsi_pm.c b/drivers/scsi/scsi_pm.c
index 9bd2c41..d4201de 100644
--- a/drivers/scsi/scsi_pm.c
+++ b/drivers/scsi/scsi_pm.c
@@ -27,7 +27,7 @@ static int scsi_dev_type_suspend(struct device *dev, pm_message_t msg)
 		if (drv && drv->suspend) {
 			err = drv->suspend(dev, msg);
 			if (err)
-				scsi_device_resume(dev);
+				scsi_device_resume(to_scsi_device(dev));
 		}
 	}
 	dev_dbg(dev, "scsi suspend: %d\n", err);

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-05-19  3:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-18 14:08 [patch] [SCSI] scsi_pm: passing wrong pointer to resume() Dan Carpenter
     [not found] ` <2FB252790F768E479D722B6F9B6D68C4B03E50@SCYBEXDAG02.amd.com>
2012-05-19  3:38   ` Aaron Lu

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).