Skip to content

Commit

Permalink
caif: fix NULL pointer check
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Alan Cox authored and davem330 committed Jul 24, 2012
1 parent 3324d02 commit c66b9b7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/net/caif/caif_serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c66b9b7

Please sign in to comment.