提交 bfa99bfd 编写于 作者: D Dan Carpenter 提交者: 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: NDan Carpenter <error27@gmail.com>
Signed-off-by: NChristian Lamparter <chunkeey@web.de>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册