提交 67fe9417 编写于 作者: C Christophe Ricard 提交者: Peter Huewe

tpm/tpm_i2c_stm_st33: Fix coccinelle warnings. Possible NULL pointer dereference

If !client the kernel mays oops in dev_info when doing client->dev.
Reported-by: NPeter Huewe <peterhuewe@gmx.de>
Signed-off-by: NChristophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: NPeter Huewe <peterhuewe@gmx.de>
上级 f2f083b5
......@@ -720,7 +720,7 @@ tpm_stm_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id)
struct tpm_stm_dev *tpm_dev;
if (!client) {
dev_info(&client->dev, "%s: i2c client is NULL. Device not accessible.\n",
pr_info("%s: i2c client is NULL. Device not accessible.\n",
__func__);
return -ENODEV;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册