Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

scsi: handle command allocation failure in scsi_reset_provider

parent a1b73fc1
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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;