linux-stable-rt/drivers/mmc/host
Julia Lawall 2198a64a74 drivers/mmc: correct error-handling code
sdhci_alloc_host returns an ERR_PTR value in an error case instead of NULL.

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

// <smpl>
@match exists@
expression x, E;
statement S1, S2;
@@

x = sdhci_alloc_host(...)
... when != x = E
(
*  if (x == NULL || ...) S1 else S2
|
*  if (x == NULL && ...) S1 else S2
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Cc: Matt Fleming <matt@console-pimps.org>
Cc: Ian Molton <ian@mnementh.co.uk>
Cc: "Roberto A. Foglietta" <roberto.foglietta@gmail.com>
Cc: Philip Langdale <philipl@overt.org>
Cc: Pierre Ossman <pierre@ossman.eu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-08-07 10:39:56 -07:00
..
Kconfig
Makefile
at91_mci.c
atmel-mci-regs.h
atmel-mci.c
au1xmmc.c
cb710-mmc.c
cb710-mmc.h
imxmmc.c
imxmmc.h
mmc_spi.c
mmci.c
mmci.h
mvsdio.c
mvsdio.h
mxcmmc.c
of_mmc_spi.c
omap.c
omap_hsmmc.c
pxamci.c
pxamci.h
ricoh_mmc.c
s3cmci.c
s3cmci.h
sdhci-of.c
sdhci-pci.c
sdhci-pltfm.c
sdhci-s3c.c
sdhci.c
sdhci.h
sdricoh_cs.c
tifm_sd.c
tmio_mmc.c
tmio_mmc.h
via-sdmmc.c
wbsd.c
wbsd.h