aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/block/dasd_ioctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/block/dasd_ioctl.c')
-rw-r--r--drivers/s390/block/dasd_ioctl.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/s390/block/dasd_ioctl.c b/drivers/s390/block/dasd_ioctl.c
index 789595b3fa09..044b75371990 100644
--- a/drivers/s390/block/dasd_ioctl.c
+++ b/drivers/s390/block/dasd_ioctl.c
@@ -7,7 +7,7 @@
7 * Bugreports.to..: <Linux390@de.ibm.com> 7 * Bugreports.to..: <Linux390@de.ibm.com>
8 * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999-2001 8 * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999-2001
9 * 9 *
10 * $Revision: 1.47 $ 10 * $Revision: 1.50 $
11 * 11 *
12 * i/o controls for the dasd driver. 12 * i/o controls for the dasd driver.
13 */ 13 */
@@ -352,6 +352,9 @@ dasd_ioctl_read_profile(struct block_device *bdev, int no, long args)
352 if (device == NULL) 352 if (device == NULL)
353 return -ENODEV; 353 return -ENODEV;
354 354
355 if (dasd_profile_level == DASD_PROFILE_OFF)
356 return -EIO;
357
355 if (copy_to_user((long __user *) args, (long *) &device->profile, 358 if (copy_to_user((long __user *) args, (long *) &device->profile,
356 sizeof (struct dasd_profile_info_t))) 359 sizeof (struct dasd_profile_info_t)))
357 return -EFAULT; 360 return -EFAULT;