projects
/
linux-2.6-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4063512
)
applicom: fix some err codes returned by ac_ioctl
author
Xu Jia
<xujia39@huawei.com>
Wed, 24 Mar 2021 07:20:31 +0000
(15:20 +0800)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Sun, 28 Mar 2021 12:50:49 +0000
(14:50 +0200)
When cmd > 6 or copy_to_user() fail, The variable 'ret' would not be
returned back. Fix the 'ret' set but not used.
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Xu Jia <xujia39@huawei.com>
Link:
https://lore.kernel.org/r/20210324072031.941791-1-xujia39@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/char/applicom.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/char/applicom.c
b/drivers/char/applicom.c
index 14b2d8034c51df0af290641f984ef8eb46bc1a0a..0ab7651433540dcc5869a45c4628607108494ca5 100644
(file)
--- a/
drivers/char/applicom.c
+++ b/
drivers/char/applicom.c
@@
-839,7
+839,7
@@
static long ac_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
Dummy = readb(apbs[IndexCard].RamIO + VERS);
kfree(adgl);
mutex_unlock(&ac_mutex);
- return
0
;
+ return
ret
;
err:
if (warncount) {