Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c66b9b7d authored by Alan Cox's avatar Alan Cox Committed by David S. Miller
Browse files

caif: fix NULL pointer check

parent 3324d024
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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;