Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Dan Carpenter and committed by
John W. Linville
bfa99bfd ed5c8ef3

+1 -1
+1 -1
drivers/net/wireless/p54/p54spi.c
··· 635 635 636 636 hw = p54_init_common(sizeof(*priv)); 637 637 if (!hw) { 638 - dev_err(&priv->spi->dev, "could not alloc ieee80211_hw"); 638 + dev_err(&spi->dev, "could not alloc ieee80211_hw"); 639 639 return -ENOMEM; 640 640 } 641 641