aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Ricard <christophe.ricard@gmail.com>2014-12-02 15:06:03 -0500
committerPeter Huewe <peterhuewe@gmx.de>2015-01-17 08:00:09 -0500
commit67fe94175a3e2da2bb0897f644ed856b8528c633 (patch)
tree135c0c94d476dd362a35e453b13ebba3e6a8cb73
parentf2f083b5d478d409e6658392088e7e594f748c04 (diff)
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.c2
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)
720 struct tpm_stm_dev *tpm_dev; 720 struct tpm_stm_dev *tpm_dev;
721 721
722 if (!client) { 722 if (!client) {
723 dev_info(&client->dev, "%s: i2c client is NULL. Device not accessible.\n", 723 pr_info("%s: i2c client is NULL. Device not accessible.\n",
724 __func__); 724 __func__);
725 return -ENODEV; 725 return -ENODEV;
726 } 726 }