提交 f00c2987 编写于 作者: C Christophe JAILLET 提交者: Marcel Holtmann

ieee802154: ca8210: Fix a potential NULL pointer dereference

'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: NChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
上级 9374bf18
...@@ -917,10 +917,7 @@ static int ca8210_spi_transfer( ...@@ -917,10 +917,7 @@ static int ca8210_spi_transfer(
struct cas_control *cas_ctl; struct cas_control *cas_ctl;
if (!spi) { if (!spi) {
dev_crit( pr_crit("NULL spi device passed to %s\n", __func__);
&spi->dev,
"NULL spi device passed to ca8210_spi_transfer\n"
);
return -ENODEV; return -ENODEV;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册