mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-03-17 12:44:10 +00:00
SCSI fixes on 20230724
Single fix for a potential regression over a misunderstanding of the blk_get_queue() api. Signed-off-by: James E.J. Bottomley <jejb@linux.ibm.com> -----BEGIN PGP SIGNATURE----- iJwEABMIAEQWIQTnYEDbdso9F2cI+arnQslM7pishQUCZL7MmSYcamFtZXMuYm90 dG9tbGV5QGhhbnNlbnBhcnRuZXJzaGlwLmNvbQAKCRDnQslM7pishS5CAP9nqusg 7fN/2nO7MdZNeZwHvNVmgBOVO7z4vPypCTN8oAEAvMQUcXjQFUuIm4qJalF0UPKv GxQjWcd2Pm7rYI6i/9Y= =/KLr -----END PGP SIGNATURE----- Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fix from James Bottomley: "A single fix for a potential regression over a misunderstanding of the blk_get_queue() api" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: sg: Fix checking return value of blk_get_queue()
This commit is contained in:
commit
0b5547c518
1 changed files with 4 additions and 3 deletions
|
@ -1497,9 +1497,10 @@ sg_add_device(struct device *cl_dev)
|
|||
int error;
|
||||
unsigned long iflags;
|
||||
|
||||
error = blk_get_queue(scsidp->request_queue);
|
||||
if (error)
|
||||
return error;
|
||||
if (!blk_get_queue(scsidp->request_queue)) {
|
||||
pr_warn("%s: get scsi_device queue failed\n", __func__);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
error = -ENOMEM;
|
||||
cdev = cdev_alloc();
|
||||
|
|
Loading…
Add table
Reference in a new issue