mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
caif: fix NULL pointer check
Reported-by: <[email protected]> Resolves-bug: http://bugzilla.kernel.org/show_bug?44441 Signed-off-by: Alan Cox <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
3324d024ba
commit
c66b9b7d36
1 changed files with 3 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue