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

Commit 07f5d563 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Martin K. Petersen
Browse files

scsi: scsi_transport_sas: check reply payload length instead of bidi request



As a user of bsg-lib the SAS transport should not poke into request
internals but use the bsg_job fields instead.

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarHannes Reinecke <hare@suse.com>
Reviewed-by: default avatarJohannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 67ec299b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -177,7 +177,7 @@ static int sas_smp_dispatch(struct bsg_job *job)
	if (!scsi_is_host_device(job->dev))
		rphy = dev_to_rphy(job->dev);

	if (!job->req->next_rq) {
	if (!job->reply_payload.payload_len) {
		dev_warn(job->dev, "space for a smp response is missing\n");
		bsg_job_done(job, -EINVAL, 0);
		return 0;