diff options
author | Alex Shi <alex.shi@linaro.org> | 2016-03-18 12:02:41 +0800 |
---|---|---|
committer | Alex Shi <alex.shi@linaro.org> | 2016-03-18 12:02:41 +0800 |
commit | 5cc3b58828a8bb2ebb34de96d1aec1564f912a31 (patch) | |
tree | 2694db57173168b3a222c25c3372cdef0b17924f /drivers/ata/libata-scsi.c | |
parent | c24745baffdb7143d6f345659fb6d781b070ca50 (diff) | |
parent | 7f30737678023b5becaf0e2e012665f71b886a7d (diff) |
Merge tag 'v4.1.20' into linux-linaro-lsk-v4.1lsk-v4.1-16.03
This is the 4.1.20 stable release
Diffstat (limited to 'drivers/ata/libata-scsi.c')
-rw-r--r-- | drivers/ata/libata-scsi.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index 0d7f0da3a269..ae7cfcb562dc 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c @@ -675,19 +675,18 @@ static int ata_ioc32(struct ata_port *ap) int ata_sas_scsi_ioctl(struct ata_port *ap, struct scsi_device *scsidev, int cmd, void __user *arg) { - int val = -EINVAL, rc = -EINVAL; + unsigned long val; + int rc = -EINVAL; unsigned long flags; switch (cmd) { - case ATA_IOC_GET_IO32: + case HDIO_GET_32BIT: spin_lock_irqsave(ap->lock, flags); val = ata_ioc32(ap); spin_unlock_irqrestore(ap->lock, flags); - if (copy_to_user(arg, &val, 1)) - return -EFAULT; - return 0; + return put_user(val, (unsigned long __user *)arg); - case ATA_IOC_SET_IO32: + case HDIO_SET_32BIT: val = (unsigned long) arg; rc = 0; spin_lock_irqsave(ap->lock, flags); |