Message ID | 20120724124207.4444.49789.stgit@localhost.localdomain |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
From: Alan Cox <alan@lxorguk.ukuu.org.uk> Date: Tue, 24 Jul 2012 13:42:14 +0100 > From: Alan Cox <alan@linux.intel.com> > > Reported-by: <rucsoftsec@gmail.com> > Resolves-bug: http://bugzilla.kernel.org/show_bug?44441 > Signed-off-by: Alan Cox <alan@linux.intel.com> Applied and queued up for -stable. > + if (dev == NULL) I adjusted this to be "if (!dev)" -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/net/caif/caif_serial.c b/drivers/net/caif/caif_serial.c index 8a3054b..7e84175 100644 --- 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 == NULL) + return -ENOMEM; + ser = netdev_priv(dev); ser->tty = tty_kref_get(tty); ser->dev = dev;