Skip to content

Commit

Permalink
ieee802154: ca8210: Fix a potential NULL pointer dereference
Browse files Browse the repository at this point in the history
'spi' is known to be NULL, so we dereference a NULL pointer here.
Use 'pr_crit()' instead of 'dev_crit()' to report the message.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
  • Loading branch information
Christophe JAILLET authored and Marcel Holtmann committed Aug 20, 2017
1 parent 9374bf1 commit f00c298
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/net/ieee802154/ca8210.c
Original file line number Diff line number Diff line change
Expand Up @@ -917,10 +917,7 @@ static int ca8210_spi_transfer(
struct cas_control *cas_ctl;

if (!spi) {
dev_crit(
&spi->dev,
"NULL spi device passed to ca8210_spi_transfer\n"
);
pr_crit("NULL spi device passed to %s\n", __func__);
return -ENODEV;
}

Expand Down

0 comments on commit f00c298

Please sign in to comment.