aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2010-12-09 21:40:09 -0500
committerDavid S. Miller <davem@davemloft.net>2010-12-10 19:15:59 -0500
commit36accaed22347f4b09cbc3c9fe2c1163a3575ea1 (patch)
tree51ebac7f128c39a97da82cbe98b02c34e38e92cc /drivers/isdn
parent5d52040d4d1eabb56a4d51b760ab8f74eabb9001 (diff)
isdn: return -EFAULT if copy_from_user() fails
We should be returning -EFAULT here. Mostly this patch is to silence a smatch warning. The upper levels of this driver turn all non-zero return values from isar_load_firmware() into 1. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/isdn')
-rw-r--r--drivers/isdn/hisax/isar.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/isdn/hisax/isar.c b/drivers/isdn/hisax/isar.c
index 1be4552d94b4..c9cd4d22b4a5 100644
--- a/drivers/isdn/hisax/isar.c
+++ b/drivers/isdn/hisax/isar.c
@@ -212,9 +212,9 @@ isar_load_firmware(struct IsdnCardState *cs, u_char __user *buf)
212 cs->debug &= ~(L1_DEB_HSCX | L1_DEB_HSCX_FIFO); 212 cs->debug &= ~(L1_DEB_HSCX | L1_DEB_HSCX_FIFO);
213#endif 213#endif
214 214
215 if ((ret = copy_from_user(&size, p, sizeof(int)))) { 215 if (copy_from_user(&size, p, sizeof(int))) {
216 printk(KERN_ERR"isar_load_firmware copy_from_user ret %d\n", ret); 216 printk(KERN_ERR"isar_load_firmware copy_from_user ret %d\n", ret);
217 return ret; 217 return -EFAULT;
218 } 218 }
219 p += sizeof(int); 219 p += sizeof(int);
220 printk(KERN_DEBUG"isar_load_firmware size: %d\n", size); 220 printk(KERN_DEBUG"isar_load_firmware size: %d\n", size);