Commit 9374074f authored by Dominik Brodowski's avatar Dominik Brodowski

[PATCH] pcmcia: handle __copy_from_user() return value in ioctl

Handle __copy_from_user() return value.

drivers/pcmcia/pcmcia_ioctl.c:597: warning: ignoring return value of '__copy_from_user', declared with attribute warn_unused_result

Noticed and first fix by Randy Dunlap.
Signed-off-by: default avatarDominik Brodowski <linux@dominikbrodowski.net>
parent 1d2c9042
...@@ -594,7 +594,12 @@ static int ds_ioctl(struct inode * inode, struct file * file, ...@@ -594,7 +594,12 @@ static int ds_ioctl(struct inode * inode, struct file * file,
err = ret = 0; err = ret = 0;
if (cmd & IOC_IN) __copy_from_user((char *)buf, uarg, size); if (cmd & IOC_IN) {
if (__copy_from_user((char *)buf, uarg, size)) {
err = -EFAULT;
goto free_out;
}
}
switch (cmd) { switch (cmd) {
case DS_ADJUST_RESOURCE_INFO: case DS_ADJUST_RESOURCE_INFO:
......
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