Re: [PATCH] nfc: netlink: avoid NULL pointer dereference on error

2015-10-19 Thread Samuel Ortiz
Hi Vincent, On Wed, Oct 07, 2015 at 11:33:19AM +0200, Vincent Stehlé wrote: > The function nfc_genl_llc_sdreq() can dereference the dev pointer while > it is NULL on its error path. Create a new error handling label to avoid > that. > > This fixes the following coccinelle error: > >

[PATCH] nfc: netlink: avoid NULL pointer dereference on error

2015-10-07 Thread Vincent Stehlé
The function nfc_genl_llc_sdreq() can dereference the dev pointer while it is NULL on its error path. Create a new error handling label to avoid that. This fixes the following coccinelle error: ./net/nfc/netlink.c:1175:21-24: ERROR: dev is NULL but dereferenced. Signed-off-by: Vincent Stehlé