summaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorGustavo A. R. Silva <garsilva@embeddedor.com>2017-06-13 14:55:42 -0500
committerJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>2017-06-19 02:36:04 +0200
commite4b0852798bc15ed1a3ed6768ef2c4d2a1cb7599 (patch)
tree7dd38a3483f17d3b74775ab8d3d219774b8d0726 /drivers/char
parent23c3beae581f7cee193c078093a4696040dd380a (diff)
downloadlinux-stable-e4b0852798bc15ed1a3ed6768ef2c4d2a1cb7599.tar.gz
linux-stable-e4b0852798bc15ed1a3ed6768ef2c4d2a1cb7599.tar.bz2
linux-stable-e4b0852798bc15ed1a3ed6768ef2c4d2a1cb7599.zip
tpm/tpm_atmel: remove unnecessary NULL check
Remove unnecessary NULL check. Pointer _chip_ cannot be NULL in this instance. Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com> Reviewed-by: Jarkko Sakkinen <jarkko.sakkine@linux.intel.com> Tested-by: Jarkko Sakkinen <jarkko.sakkine@linux.intel.com> (compilation) Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/tpm/tpm_atmel.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/char/tpm/tpm_atmel.c b/drivers/char/tpm/tpm_atmel.c
index 0d322ab11faa..66a14526aaf4 100644
--- a/drivers/char/tpm/tpm_atmel.c
+++ b/drivers/char/tpm/tpm_atmel.c
@@ -144,13 +144,11 @@ static void atml_plat_remove(void)
struct tpm_chip *chip = dev_get_drvdata(&pdev->dev);
struct tpm_atmel_priv *priv = dev_get_drvdata(&chip->dev);
- if (chip) {
- tpm_chip_unregister(chip);
- if (priv->have_region)
- atmel_release_region(priv->base, priv->region_size);
- atmel_put_base_addr(priv->iobase);
- platform_device_unregister(pdev);
- }
+ tpm_chip_unregister(chip);
+ if (priv->have_region)
+ atmel_release_region(priv->base, priv->region_size);
+ atmel_put_base_addr(priv->iobase);
+ platform_device_unregister(pdev);
}
static SIMPLE_DEV_PM_OPS(tpm_atml_pm, tpm_pm_suspend, tpm_pm_resume);