Commit 0b5547c5 authored by Linus Torvalds's avatar Linus Torvalds

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()
parents 20ea1e7d 80b60510
......@@ -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();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment