linux_dsm_epyc7002/drivers/usb/class
Julia Lawall 49b707b90c drivers/usb/class/usblp.c: adjust error handling code
In this code, it is possible to tell statically whether usblp will be NULL
in the error handling code.

Oliver Neukum suggested to make a goto to the final return rather than 
return directly.

The semantic match that finds this problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@
identifier f,err,l,l1;
type T;
expression x,E;
statement S;
@@

x = NULL
... when != goto l1;
* x = f(...)
... when != x
err = E;
goto l;
...
* if (x != NULL)
  S
return err;
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Cc: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-17 14:40:51 -07:00
..
cdc-acm.c USB: cdc-acm: don't unlock acm->mutex on error path 2008-08-21 10:26:35 -07:00
cdc-acm.h usb: cdc-acm: drain writes on close 2008-08-13 17:32:57 -07:00
cdc-wdm.c USB: fix build error in cdc-acm for CONFIG_PM=n 2008-07-21 15:16:47 -07:00
Kconfig USB: add USB test and measurement class driver 2008-10-17 14:40:51 -07:00
Makefile USB: add USB test and measurement class driver 2008-10-17 14:40:51 -07:00
usblp.c drivers/usb/class/usblp.c: adjust error handling code 2008-10-17 14:40:51 -07:00
usbtmc.c USB: add USB test and measurement class driver 2008-10-17 14:40:51 -07:00