diff options
author | Christophe Ricard <christophe.ricard@gmail.com> | 2014-12-02 21:06:03 +0100 |
---|---|---|
committer | Peter Huewe <peterhuewe@gmx.de> | 2015-01-17 14:00:09 +0100 |
commit | 67fe94175a3e2da2bb0897f644ed856b8528c633 (patch) | |
tree | 135c0c94d476dd362a35e453b13ebba3e6a8cb73 | |
parent | f2f083b5d478d409e6658392088e7e594f748c04 (diff) | |
download | linux-67fe94175a3e2da2bb0897f644ed856b8528c633.tar.bz2 |
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: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
-rw-r--r-- | drivers/char/tpm/tpm_i2c_stm_st33.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/tpm/tpm_i2c_stm_st33.c b/drivers/char/tpm/tpm_i2c_stm_st33.c index e643c8627b7d..86203b022d13 100644 --- a/drivers/char/tpm/tpm_i2c_stm_st33.c +++ b/drivers/char/tpm/tpm_i2c_stm_st33.c @@ -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; } |