mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-13 00:20:06 +00:00
scsi: handle command allocation failure in scsi_reset_provider
Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Nicholas Bellinger <nab@linux-iscsi.org> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Reviewed-by: Hannes Reinecke <hare@suse.de>
This commit is contained in:
parent
a1b73fc194
commit
95eeb5f588
@ -2306,6 +2306,12 @@ scsi_reset_provider(struct scsi_device *dev, int flag)
|
||||
}
|
||||
|
||||
scmd = scsi_get_command(dev, GFP_KERNEL);
|
||||
if (!scmd) {
|
||||
rtn = FAILED;
|
||||
put_device(&dev->sdev_gendev);
|
||||
goto out_put_autopm_host;
|
||||
}
|
||||
|
||||
blk_rq_init(NULL, &req);
|
||||
scmd->request = &req;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user