Message ID | 20220426080602.wdquj6ra3vhufur4@pengutronix.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | char: tpm: cr50_i2c: Suppress duplicated error message in .remove() | expand |
On Tue, Apr 26, 2022 at 10:06:02AM +0200, Uwe Kleine-König wrote: > - dev_err(dev, "Could not get client data at remove\n"); > - return -ENODEV; > + dev_crit(dev, "Could not get client data at remove, memory corruption ahead\n"); > + return 0; Just change the return value 0 and log-level, message can be as it is. BR, Jarkko
On Wed, May 04, 2022 at 06:53:17AM +0300, Jarkko Sakkinen wrote: > On Tue, Apr 26, 2022 at 10:06:02AM +0200, Uwe Kleine-König wrote: > > - dev_err(dev, "Could not get client data at remove\n"); > > - return -ENODEV; > > + dev_crit(dev, "Could not get client data at remove, memory corruption ahead\n"); > > + return 0; > > Just change the return value 0 and log-level, message can be as it is. Ignore, I applied the patch. BR, Jarkko
diff --git a/drivers/char/tpm/tpm_tis_i2c_cr50.c b/drivers/char/tpm/tpm_tis_i2c_cr50.c index f6c0affbb456..bf608b6af339 100644 --- a/drivers/char/tpm/tpm_tis_i2c_cr50.c +++ b/drivers/char/tpm/tpm_tis_i2c_cr50.c @@ -768,8 +768,8 @@ static int tpm_cr50_i2c_remove(struct i2c_client *client) struct device *dev = &client->dev; if (!chip) { - dev_err(dev, "Could not get client data at remove\n"); - return -ENODEV; + dev_crit(dev, "Could not get client data at remove, memory corruption ahead\n"); + return 0; } tpm_chip_unregister(chip);