tpm/tpm_atmel: remove unnecessary NULL check
authorGustavo A. R. Silva <garsilva@embeddedor.com>
Tue, 13 Jun 2017 19:55:42 +0000 (14:55 -0500)
committerJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Mon, 19 Jun 2017 00:36:04 +0000 (02:36 +0200)
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>
drivers/char/tpm/tpm_atmel.c

index 0d322ab11faabcbae304f9611665873900778962..66a14526aaf4c811f7f15d0bd94c195ab2dabd3e 100644 (file)
@@ -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);