Merge branch '4.3-fixes' into mips-for-linux-next
[linux-drm-fsl-dcu.git] / block / scsi_ioctl.c
index 55b6f15dac900af77a5ad7038cd98f3133d816a8..dda653ce7b24cfb959f668bdb4a676900ed7637d 100644 (file)
@@ -326,8 +326,8 @@ static int sg_io(struct request_queue *q, struct gendisk *bd_disk,
                        goto out_put_request;
        }
 
-       ret = -EFAULT;
-       if (blk_fill_sghdr_rq(q, rq, hdr, mode))
+       ret = blk_fill_sghdr_rq(q, rq, hdr, mode);
+       if (ret < 0)
                goto out_free_cdb;
 
        ret = 0;