Yu Kuai 80b6051085 scsi: sg: Fix checking return value of blk_get_queue()
Commit fcaa174a9c99 ("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: fcaa174a9c99 ("scsi/sg: don't grab scsi host module reference")
Reported-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Closes: https://lore.kernel.org/all/87lefv622n.fsf@linux.ibm.com/
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Link: https://lore.kernel.org/r/20230705024001.177585-1-yukuai1@huaweicloud.com
Tested-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Tested-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2023-07-19 23:12:13 -04:00
..
2023-05-31 19:59:26 -04:00
2023-05-31 19:59:26 -04:00
2023-04-26 16:07:23 -07:00
2023-04-27 11:53:57 -07:00
2023-04-27 16:36:55 -07:00
2023-06-28 21:45:27 -04:00
2023-06-30 11:57:07 -07:00
2023-06-30 11:57:07 -07:00
2023-05-31 19:59:26 -04:00
2023-05-31 19:59:26 -04:00
2023-07-08 12:35:18 -07:00
2023-05-26 13:52:19 -07:00
2023-04-18 23:01:23 -04:00
2023-05-31 19:59:26 -04:00
2022-06-27 22:56:21 -04:00
2023-04-27 11:53:57 -07:00
2022-02-22 21:11:02 -05:00
2023-06-30 11:57:07 -07:00
2022-05-08 14:28:18 -04:00
2023-06-30 11:57:07 -07:00
2023-04-27 11:53:57 -07:00
2021-12-22 23:41:13 -05:00
2023-06-30 11:57:07 -07:00
2023-05-31 11:36:40 -04:00