Commit 8861461c authored by Yu Kuai's avatar Yu Kuai Committed by Treehugger Robot
Browse files

FROMLIST: scsi/sg: fix checking return value of blk_get_queue()



Commit fcaa174a ("scsi/sg: don't grab scsi host module reference")
make a mess how blk_get_queue() is called, blk_get_queue() returns true
on success while the caller expects it returns 0 on success.

Fix this problem and also add a corresponding error message on failure.

Fixes: fcaa174a ("scsi/sg: don't grab scsi host module reference")
Reported-by: default avatarMarc Hartmayer <mhartmay@linux.ibm.com>
Closes: https://lore.kernel.org/all/87lefv622n.fsf@linux.ibm.com/


Signed-off-by: default avatarYu Kuai <yukuai3@huawei.com>
Test: manual boot test, TH
Bug: 290862678
Link: https://lore.kernel.org/all/20230705024001.177585-1-yukuai1@huaweicloud.com/


Change-Id: Ia1e19ba19062f741006f338206307613ef218021
Signed-off-by: default avatarAndré Draszik <draszik@google.com>
parent 1ee8780d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment