Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 67fe9417 authored by Christophe Ricard's avatar Christophe Ricard Committed by Peter Huewe
Browse files

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: default avatarPeter Huewe <peterhuewe@gmx.de>
Signed-off-by: default avatarChristophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: default avatarPeter Huewe <peterhuewe@gmx.de>
parent f2f083b5
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -720,7 +720,7 @@ tpm_stm_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id)
	struct tpm_stm_dev *tpm_dev;
	struct tpm_stm_dev *tpm_dev;


	if (!client) {
	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__);
			__func__);
		return -ENODEV;
		return -ENODEV;
	}
	}