OSDN Git Service
(root)
/
tomoyo
/
tomoyo-test1.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d442af2
)
ray_cs: Check return value of pcmcia_register_driver
author
YueHaibing
<yuehaibing@huawei.com>
Wed, 6 Mar 2019 11:46:14 +0000
(19:46 +0800)
committer
Kalle Valo
<kvalo@codeaurora.org>
Thu, 25 Apr 2019 16:38:26 +0000
(19:38 +0300)
init_ray_cs does not check value of pcmcia_register_driver,
if it fails, there maybe cause a NULL pointer dereference in
exit_ray_cs.
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ray_cs.c
patch
|
blob
|
history
diff --git
a/drivers/net/wireless/ray_cs.c
b/drivers/net/wireless/ray_cs.c
index
44a943d
..
d561659
100644
(file)
--- a/
drivers/net/wireless/ray_cs.c
+++ b/
drivers/net/wireless/ray_cs.c
@@
-2795,6
+2795,8
@@
static int __init init_ray_cs(void)
rc = pcmcia_register_driver(&ray_driver);
pr_debug("raylink init_module register_pcmcia_driver returns 0x%x\n",
rc);
+ if (rc)
+ return rc;
#ifdef CONFIG_PROC_FS
proc_mkdir("driver/ray_cs", NULL);