linux/drivers/usb/chipidea
Julia Lawall 5c6e9bf011 drivers/usb/chipidea/core.c: adjust duplicate test
Delete successive tests to the same location.  In this case res has already
been tested for being NULL, and calling devm_request_and_ioremap will not
make it NULL.  On the other hand, devm_request_and_ioremap can return NULL
on failure.

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

// <smpl>
@s exists@
local idexpression y;
expression x,e;
@@

*if ( \(x == NULL\|IS_ERR(x)\|y != 0\) )
 { ... when forall
   return ...; }
... when != \(y = e\|y += e\|y -= e\|y |= e\|y &= e\|y++\|y--\|&y\)
    when != \(XT_GETPAGE(...,y)\|WMI_CMD_BUF(...)\)
*if ( \(x == NULL\|IS_ERR(x)\|y != 0\) )
 { ... when forall
   return ...; }
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-21 13:15:31 -08:00
..
bits.h usb: chipidea: add host role 2012-05-11 16:56:15 -07:00
ci13xxx_imx.c usb: remove use of __devexit 2012-11-21 13:27:17 -08:00
ci13xxx_imx.h USB: chipidea: add imx usbmisc support 2012-09-12 11:20:38 -07:00
ci13xxx_msm.c usb: remove use of __devexit 2012-11-21 13:27:17 -08:00
ci13xxx_pci.c usb: remove use of __devexit 2012-11-21 13:27:17 -08:00
ci.h USB: chipidea: add vbus detect for udc 2012-09-12 11:20:38 -07:00
core.c drivers/usb/chipidea/core.c: adjust duplicate test 2013-01-21 13:15:31 -08:00
debug.c usb: gadget: Remove reference to is_dualspeed from sysfs. 2012-11-08 16:04:34 +02:00
debug.h
host.c usb: chipidea: Allow disabling streaming not only in udc mode 2013-01-11 16:01:07 -08:00
host.h usb: chipidea: add host role 2012-05-11 16:56:15 -07:00
Kconfig USB: EHCI: fix build error by making ChipIdea host a normal EHCI driver 2012-11-02 10:03:50 -07:00
Makefile USB: chipidea: add -DDEBUG if debugging is enabled 2012-09-12 11:20:38 -07:00
udc.c USB: chipidea: add vbus detect for udc 2012-09-12 11:20:38 -07:00
udc.h usb: chipidea: use generic map/unmap routines 2012-05-11 16:59:35 -07:00
usbmisc_imx6q.c usb: remove use of __devexit 2012-11-21 13:27:17 -08:00