aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2009-07-19 21:26:13 +0200
committerJohn W. Linville <linville@tuxdriver.com>2009-07-21 15:59:48 -0400
commitbfa99bfdda1ce8a60f1f0fba7a04162a66d4ecfa (patch)
tree57408c184ab84083a634475bd0e002f692d777f0
parented5c8ef3bb2de277b7885072e0e981c41a022be5 (diff)
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>
-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 83116baeb11..72c7dbd39d0 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;
}