Home
last modified time | relevance | path

Searched hist:"109 f34e71b9049a57f6cdf3f1da6bee2b722b259" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/drivers/usb/serial/
H A Ddigi_acceleport.cdiff 109f34e71b9049a57f6cdf3f1da6bee2b722b259 Thu May 27 07:32:09 CDT 2010 Julia Lawall <julia@diku.dk> USB: serial: digi_acceleport: Eliminate a NULL pointer dereference

If port is NULL, then the call to dev_err will dereference a value that is
a small offset from NULL.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@r exists@
expression E,E1;
identifier f;
statement S1,S2,S3;
@@

if ((E == NULL && ...) || ...)
{
... when != if (...) S1 else S2
when != E = E1
* E->f
... when any
return ...;
}
else S3
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>