kernel-hacking-2024-linux-s.../drivers
Peter Senna Tschudin 691299201b drivers/net/ethernet/amd/au1000_eth.c: fix error return code
The function au1000_probe() return 0 for success and negative value
for most of its internal tests failures. There are exceptions
that are error cases going to err_out:. For this cases, the
function abort its success execution path, but returns non negative
value, making it dificult for a caller function to notice the error.

This patch fixes the error cases that do not return negative values.

This was found by Coccinelle, but the code change was made by hand.
This patch is not robot generated.

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

// <smpl>
(
if@p1 (\(ret < 0\|ret != 0\))
 { ... return ret; }
|
ret@p1 = 0
)
... when != ret = e1
    when != &ret
*if(...)
{
  ... when != ret = e2
      when forall
 return ret;
}
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-07 14:37:11 -04:00
..
accessibility
acpi Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2012-10-03 23:29:23 -07:00
amba
ata
atm sections: fix section conflicts in drivers/atm 2012-10-06 03:04:40 +09:00
auxdisplay
base firmware: use 'kernel_read()' to read firmware into kernel buffer 2012-10-04 09:19:02 -07:00
bcma
block Features: 2012-10-07 07:13:01 +09:00
bluetooth
bus
cdrom
char sections: fix section conflicts in drivers/char 2012-10-06 03:04:41 +09:00
clk
clocksource
connector
cpufreq
cpuidle
crypto Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2012-10-06 03:16:12 +09:00
dca
devfreq
dio
dma drivers/dma/dmaengine.c: lower the priority of 'failed to get' dma channel message 2012-10-06 03:04:36 +09:00
edac Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2012-10-06 03:16:12 +09:00
eisa
extcon
firewire
firmware
gpio MFD bits for the 3.7 merge window. 2012-10-05 12:01:30 +09:00
gpu Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2012-10-03 23:29:23 -07:00
hid
hsi
hv
hwmon
hwspinlock
i2c idr: rename MAX_LEVEL to MAX_IDR_LEVEL 2012-10-06 03:04:56 +09:00
ide sections: fix section conflicts in drivers/ide 2012-10-06 03:04:41 +09:00
idle
iio
infiniband infiniband: pass rdma_cm module to netlink_dump_start 2012-10-07 00:30:56 -04:00
input MFD bits for the 3.7 merge window. 2012-10-05 12:01:30 +09:00
iommu
irqchip
isdn
leds MFD bits for the 3.7 merge window. 2012-10-05 12:01:30 +09:00
lguest
macintosh Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2012-10-06 03:16:12 +09:00
md
media
memory
memstick
message
mfd Merge branch 'akpm' (Andrew's patch-bomb) 2012-10-06 03:09:16 +09:00
misc
mmc sections: fix section conflicts in drivers/mmc 2012-10-06 03:04:42 +09:00
mtd Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2012-10-06 03:16:12 +09:00
net drivers/net/ethernet/amd/au1000_eth.c: fix error return code 2012-10-07 14:37:11 -04:00
nfc
nubus
of Devicetree updates for 3.7 2012-10-03 09:44:08 -07:00
oprofile
parisc
parport
pci Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2012-10-06 03:16:12 +09:00
pcmcia
pinctrl
platform sections: fix section conflicts in drivers/platform/x86 2012-10-06 03:04:43 +09:00
pnp
power
pps idr: rename MAX_LEVEL to MAX_IDR_LEVEL 2012-10-06 03:04:56 +09:00
ps3
ptp
pwm MFD bits for the 3.7 merge window. 2012-10-05 12:01:30 +09:00
rapidio rapidio: add destination ID allocation mechanism 2012-10-06 03:05:23 +09:00
regulator MFD bits for the 3.7 merge window. 2012-10-05 12:01:30 +09:00
remoteproc - Remoteproc Recovery - by Fernando Guzman Lugo - when a remote processor 2012-10-04 09:11:57 -07:00
rpmsg
rtc Merge branch 'akpm' (Andrew's patch-bomb) 2012-10-06 03:09:16 +09:00
s390
sbus
scsi Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2012-10-06 03:16:12 +09:00
sfi
sh
sn
spi Devicetree updates for 3.7 2012-10-03 09:44:08 -07:00
ssb
staging Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2012-10-03 23:29:23 -07:00
target
tc
thermal idr: rename MAX_LEVEL to MAX_IDR_LEVEL 2012-10-06 03:04:56 +09:00
tty Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2012-10-06 03:16:12 +09:00
uio
usb Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2012-10-02 20:25:04 -07:00
uwb
vfio
vhost
video Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2012-10-06 03:16:12 +09:00
virt
virtio
vlynq
vme
w1
watchdog MFD bits for the 3.7 merge window. 2012-10-05 12:01:30 +09:00
xen Features: 2012-10-07 07:13:01 +09:00
zorro
Kconfig
Makefile