Commit bfa99bfd authored by Dan Carpenter's avatar Dan Carpenter Committed by John W. Linville

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: default avatarDan Carpenter <error27@gmail.com>
Signed-off-by: default avatarChristian Lamparter <chunkeey@web.de>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent ed5c8ef3
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment