summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/p54/p54spi.c
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2009-07-19 23:26:13 +0400
committerJohn W. Linville <linville@tuxdriver.com>2009-07-21 23:59:48 +0400
commitbfa99bfdda1ce8a60f1f0fba7a04162a66d4ecfa (patch)
tree57408c184ab84083a634475bd0e002f692d777f0 /drivers/net/wireless/p54/p54spi.c
parented5c8ef3bb2de277b7885072e0e981c41a022be5 (diff)
downloadlinux-bfa99bfdda1ce8a60f1f0fba7a04162a66d4ecfa.tar.xz
p54spi: fix potential null deref in p54spi.c
Fix a potential NULL dereference bug during error handling in p54spi_probe. This bug was discovered by smatch: (http://repo.or.cz/w/smatch.git). Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Christian Lamparter <chunkeey@web.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/p54/p54spi.c')
-rw-r--r--drivers/net/wireless/p54/p54spi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/p54/p54spi.c b/drivers/net/wireless/p54/p54spi.c
index 83116baeb110..72c7dbd39d0a 100644
--- a/drivers/net/wireless/p54/p54spi.c
+++ b/drivers/net/wireless/p54/p54spi.c
@@ -635,7 +635,7 @@ static int __devinit p54spi_probe(struct spi_device *spi)
hw = p54_init_common(sizeof(*priv));
if (!hw) {
- dev_err(&priv->spi->dev, "could not alloc ieee80211_hw");
+ dev_err(&spi->dev, "could not alloc ieee80211_hw");
return -ENOMEM;
}