linux_dsm_epyc7002/drivers/usb/host
Julien Brunel ce5dee50ed USB: isp1760: Use an IS_ERR test rather than a NULL test
In case of error, the function isp1760_register returns an ERR
pointer, but never returns a NULL pointer. So after a call to this
function, a NULL test should be replaced by an IS_ERR test. Moreover,
we have noticed that:
(1) the result of isp1760_register is assigned through the function
pci_set_drvdata without an error test,
(2) if the call to isp1760_register fails, the current function
(isp1761_pci_probe) returns 0, and if it succeeds, it returns -ENOMEM,
which seems odd.

Thus, we suggest to move the test before the call to pci_set_drvdata
to correct (1), and to turn it into a non IS_ERR test to correct (2).

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

// <smpl>
@bad_null_test@
expression x,E;
statement S1, S2;
@@
x =  isp1760_register(...)
... when != x = E
* if (x == NULL)
S1 else S2
// </smpl>

Signed-off-by: Julien Brunel <brunel@diku.dk>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-17 14:41:02 -07:00
..
ehci-au1xxx.c USB: Au1xxx-usb: suspend/resume support. 2008-07-21 15:16:44 -07:00
ehci-dbg.c USB: ehci-dbg: fix reading less content of periodic file 2008-10-17 14:40:57 -07:00
ehci-fsl.c USB: EHCI: Reconciling USB register differences on MPC85xx vs MPC83xx 2008-07-21 15:16:45 -07:00
ehci-fsl.h ehci-fsl: fix cache coherency problem on system with large memory 2007-05-23 20:14:15 -07:00
ehci-hcd.c usb: remove code associated with !CONFIG_PPC_MERGE 2008-10-17 14:40:57 -07:00
ehci-hub.c USB: EHCI: fix remote-wakeup regression 2008-05-29 13:59:04 -07:00
ehci-ixp4xx.c ALSA: Correct Vladimir Barinov's e-mail address 2008-10-10 13:41:45 +02:00
ehci-mem.c Revert "USB: EHCI cpufreq fix" 2007-08-20 23:38:44 -07:00
ehci-orion.c [ARM] Move include/asm-arm/plat-orion to arch/arm/plat-orion/include/plat 2008-08-09 13:44:58 +02:00
ehci-pci.c USB: EHCI: suppress unwanted error messages 2008-05-29 13:59:03 -07:00
ehci-ppc-of.c USB: EHCI: suppress unwanted error messages 2008-05-29 13:59:03 -07:00
ehci-ps3.c USB: usb dev_name() instead of dev->bus_id 2008-07-21 15:15:46 -07:00
ehci-q.c list.h: Add list_splice_tail() and list_splice_tail_init() 2008-08-07 09:49:42 -04:00
ehci-sched.c USB: fix EHCI periodic transfers 2008-09-23 13:58:08 -07:00
ehci.h USB: improve ehci_watchdog's side effect in CPU power management 2008-10-17 14:41:02 -07:00
isp116x-hcd.c USB: Let some USB host controllers get IRQ flags from resource 2008-10-17 14:40:52 -07:00
isp116x.h Rename WARN() to WARNING() to clear the namespace 2008-07-25 10:53:29 -07:00
isp1760-hcd.c USB: ISP1760: fixed trivial math in comment 2008-08-21 10:26:32 -07:00
isp1760-hcd.h usb: isp1760: don't be noisy about short packets. 2008-08-13 17:32:55 -07:00
isp1760-if.c USB: isp1760: Use an IS_ERR test rather than a NULL test 2008-10-17 14:41:02 -07:00
Kconfig usb: r8a66597-hcd: Add support for SH7723 USB host 2008-06-09 16:04:12 +09:00
Makefile USB: ISP1760 HCD driver 2008-05-02 10:25:50 -07:00
ohci-at91.c USB: automatically enable RHSC interrupts 2008-08-21 10:26:38 -07:00
ohci-au1xxx.c USB: automatically enable RHSC interrupts 2008-08-21 10:26:38 -07:00
ohci-dbg.c USB: usb dev_name() instead of dev->bus_id 2008-07-21 15:15:46 -07:00
ohci-ep93xx.c USB: automatically enable RHSC interrupts 2008-08-21 10:26:38 -07:00
ohci-hcd.c USB: quirk PLL power down mode 2008-08-13 17:32:58 -07:00
ohci-hub.c OHCI: Allow broken controllers to auto-stop 2008-10-17 14:40:54 -07:00
ohci-lh7a404.c USB: automatically enable RHSC interrupts 2008-08-21 10:26:38 -07:00
ohci-mem.c USB: OHCI handles more ZFMicro quirks 2007-10-12 14:54:59 -07:00
ohci-omap.c USB: ohci-omap: handle other omap15xx chips 2008-10-17 14:40:59 -07:00
ohci-pci.c USB: automatically enable RHSC interrupts 2008-08-21 10:26:38 -07:00
ohci-pnx4008.c USB: automatically enable RHSC interrupts 2008-08-21 10:26:38 -07:00
ohci-pnx8550.c USB: automatically enable RHSC interrupts 2008-08-21 10:26:38 -07:00
ohci-ppc-of.c USB: automatically enable RHSC interrupts 2008-08-21 10:26:38 -07:00
ohci-ppc-soc.c USB: automatically enable RHSC interrupts 2008-08-21 10:26:38 -07:00
ohci-ps3.c USB: automatically enable RHSC interrupts 2008-08-21 10:26:38 -07:00
ohci-pxa27x.c [ARM] ohci-pxa27x: use ioremap() and offset for register access 2008-10-07 19:12:58 +01:00
ohci-q.c USB: quirk PLL power down mode 2008-08-13 17:32:58 -07:00
ohci-s3c2410.c USB: automatically enable RHSC interrupts 2008-08-21 10:26:38 -07:00
ohci-sa1111.c USB: automatically enable RHSC interrupts 2008-08-21 10:26:38 -07:00
ohci-sh.c USB: automatically enable RHSC interrupts 2008-08-21 10:26:38 -07:00
ohci-sm501.c USB: automatically enable RHSC interrupts 2008-08-21 10:26:38 -07:00
ohci-ssb.c USB: automatically enable RHSC interrupts 2008-08-21 10:26:38 -07:00
ohci.h usb: remove code associated with !CONFIG_PPC_MERGE 2008-10-17 14:40:57 -07:00
pci-quirks.c USB: replace remaining __FUNCTION__ occurrences 2008-04-24 21:16:55 -07:00
pci-quirks.h [PATCH] USB: pci-quirks.c: proper prototypes 2006-04-14 11:12:20 -07:00
r8a66597-hcd.c USB: Let some USB host controllers get IRQ flags from resource 2008-10-17 14:40:52 -07:00
r8a66597.h USB: r8a66597-hcd: Add support for SH7366 USB host 2008-04-24 21:16:49 -07:00
sl811_cs.c pcmcia: encapsulate ioaddr_t 2008-08-29 09:43:14 +02:00
sl811-hcd.c USB: Let some USB host controllers get IRQ flags from resource 2008-10-17 14:40:52 -07:00
sl811.h Rename WARN() to WARNING() to clear the namespace 2008-07-25 10:53:29 -07:00
u132-hcd.c USB: automatically enable RHSC interrupts 2008-08-21 10:26:38 -07:00
uhci-debug.c USB: add urb->unlinked field 2007-10-12 14:55:19 -07:00
uhci-hcd.c USB: UHCI: disable remote wakeup when it's not needed 2008-05-02 10:25:57 -07:00
uhci-hcd.h USB: UHCI: disable remote wakeup when it's not needed 2008-05-02 10:25:57 -07:00
uhci-hub.c USB: uhci: mark root_hub_hub_des[] as const 2008-07-21 15:16:30 -07:00
uhci-q.c USB: UHCI: improve scheduling of interrupt URBs 2008-10-17 14:41:01 -07:00