NFC: delete null dereference
authorJulia Lawall <Julia.Lawall@lip6.fr>
Sat, 17 Oct 2015 09:32:19 +0000 (11:32 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Mon, 19 Oct 2015 18:10:37 +0000 (20:10 +0200)
commit9abebb8a10ce93db45327bd3a4d06801e6db92f2
treea968400c5287a50c57b4126bd05676b33e3e095e
parentb43ef78145b10a3fb81a59596d562f21d9bab8d2
NFC: delete null dereference

The exit label performs device_unlock(&dev->dev);, which will fail when dev
is NULL, and nfc_put_device(dev);, which is not useful when dev is NULL, so
just exit the function immediately.

Problem found using scripts/coccinelle/null/deref_null.cocci

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
net/nfc/netlink.c