Commit 95eeb5f5 authored by Christoph Hellwig's avatar Christoph Hellwig

scsi: handle command allocation failure in scsi_reset_provider

Signed-off-by: default avatarChristoph Hellwig <>
Reviewed-by: default avatarNicholas Bellinger <>
Reviewed-by: default avatarMike Christie <>
Reviewed-by: default avatarHannes Reinecke <>
parent a1b73fc1
......@@ -2306,6 +2306,12 @@ scsi_reset_provider(struct scsi_device *dev, int flag)
scmd = scsi_get_command(dev, GFP_KERNEL);
if (!scmd) {
rtn = FAILED;
goto out_put_autopm_host;
blk_rq_init(NULL, &req);
scmd->request = &req;
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment