mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-13 14:24:11 +08: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…
Reference in New Issue
Block a user