diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/dvb/dvb-core/dvb_ca_en50221.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/media/dvb/dvb-core/dvb_ca_en50221.c b/drivers/media/dvb/dvb-core/dvb_ca_en50221.c index ef259a0718ac..cb97e6b85432 100644 --- a/drivers/media/dvb/dvb-core/dvb_ca_en50221.c +++ b/drivers/media/dvb/dvb-core/dvb_ca_en50221.c | |||
@@ -1318,8 +1318,11 @@ static ssize_t dvb_ca_en50221_io_write(struct file *file, | |||
1318 | 1318 | ||
1319 | fragbuf[0] = connection_id; | 1319 | fragbuf[0] = connection_id; |
1320 | fragbuf[1] = ((fragpos + fraglen) < count) ? 0x80 : 0x00; | 1320 | fragbuf[1] = ((fragpos + fraglen) < count) ? 0x80 : 0x00; |
1321 | if ((status = copy_from_user(fragbuf + 2, buf + fragpos, fraglen)) != 0) | 1321 | status = copy_from_user(fragbuf + 2, buf + fragpos, fraglen); |
1322 | if (status) { | ||
1323 | status = -EFAULT; | ||
1322 | goto exit; | 1324 | goto exit; |
1325 | } | ||
1323 | 1326 | ||
1324 | timeout = jiffies + HZ / 2; | 1327 | timeout = jiffies + HZ / 2; |
1325 | written = 0; | 1328 | written = 0; |
@@ -1494,8 +1497,11 @@ static ssize_t dvb_ca_en50221_io_read(struct file *file, char __user * buf, | |||
1494 | 1497 | ||
1495 | hdr[0] = slot; | 1498 | hdr[0] = slot; |
1496 | hdr[1] = connection_id; | 1499 | hdr[1] = connection_id; |
1497 | if ((status = copy_to_user(buf, hdr, 2)) != 0) | 1500 | status = copy_to_user(buf, hdr, 2); |
1501 | if (status) { | ||
1502 | status = -EFAULT; | ||
1498 | goto exit; | 1503 | goto exit; |
1504 | } | ||
1499 | status = pktlen; | 1505 | status = pktlen; |
1500 | 1506 | ||
1501 | exit: | 1507 | exit: |