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>
This commit is contained in:
Dan Carpenter 2009-07-19 21:26:13 +02:00 committed by John W. Linville
parent ed5c8ef3bb
commit bfa99bfdda
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}