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

Commit e4b08527 authored by Gustavo A. R. Silva's avatar Gustavo A. R. Silva Committed by Jarkko Sakkinen
Browse files

tpm/tpm_atmel: remove unnecessary NULL check



Remove unnecessary NULL check.
Pointer _chip_ cannot be NULL in this instance.

Signed-off-by: default avatarGustavo A. R. Silva <garsilva@embeddedor.com>
Reviewed-by: default avatarJarkko Sakkinen <jarkko.sakkine@linux.intel.com>
Tested-by: Jarkko Sakkinen <jarkko.sakkine@linux.intel.com> (compilation)
Signed-off-by: default avatarJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
parent 23c3beae
Loading
Loading
Loading
Loading
+5 −7
Original line number Diff line number Diff line
@@ -144,14 +144,12 @@ 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);
}
}

static SIMPLE_DEV_PM_OPS(tpm_atml_pm, tpm_pm_suspend, tpm_pm_resume);