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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
	}