projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3324d02
)
caif: fix NULL pointer check
author
Alan Cox
<alan@linux.intel.com>
Tue, 24 Jul 2012 02:42:14 +0000
(
02:42
+0000)
committer
David S. Miller
<davem@davemloft.net>
Tue, 24 Jul 2012 20:54:16 +0000
(13:54 -0700)
Reported-by: <rucsoftsec@gmail.com>
Resolves-bug: http://bugzilla.kernel.org/show_bug?44441
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/caif/caif_serial.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/net/caif/caif_serial.c
b/drivers/net/caif/caif_serial.c
index 8a3054b848125f76153d9bb53ccbaf19c1c36b3c..5de74e76202134402420311d1fe824c7ce57055a 100644
(file)
--- a/
drivers/net/caif/caif_serial.c
+++ b/
drivers/net/caif/caif_serial.c
@@
-325,6
+325,9
@@
static int ldisc_open(struct tty_struct *tty)
sprintf(name, "cf%s", tty->name);
dev = alloc_netdev(sizeof(*ser), name, caifdev_setup);
+ if (!dev)
+ return -ENOMEM;
+
ser = netdev_priv(dev);
ser->tty = tty_kref_get(tty);
ser->dev = dev;