diff options
author | Tian Tao <tiantao6@hisilicon.com> | 2021-04-29 15:39:39 +0800 |
---|---|---|
committer | Jarkko Sakkinen <jarkko@kernel.org> | 2021-06-23 16:51:03 +0300 |
commit | 7937bd532fe6f6342206b3e002bd791bf25085e0 (patch) | |
tree | e2ae672ceda3aaaf3ddc77adf2dc0ffa4be0b666 /drivers/char/tpm/tpm_crb.c | |
parent | 0c18f29aae7ce3dadd26d8ee3505d07cc982df75 (diff) | |
download | linux-7937bd532fe6f6342206b3e002bd791bf25085e0.tar.gz linux-7937bd532fe6f6342206b3e002bd791bf25085e0.tar.bz2 linux-7937bd532fe6f6342206b3e002bd791bf25085e0.zip |
tpm_crb: Use IOMEM_ERR_PTR when function returns iomem
This is to simplify the code, and IOMEM_ERR_PTR(err) is same with
(__force void __iomem *)ERR_PTR(err).
Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
Diffstat (limited to 'drivers/char/tpm/tpm_crb.c')
-rw-r--r-- | drivers/char/tpm/tpm_crb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/tpm/tpm_crb.c b/drivers/char/tpm/tpm_crb.c index a9dcf31eadd2..18606651d1aa 100644 --- a/drivers/char/tpm/tpm_crb.c +++ b/drivers/char/tpm/tpm_crb.c @@ -464,7 +464,7 @@ static void __iomem *crb_map_res(struct device *dev, struct resource *iores, /* Detect a 64 bit address on a 32 bit system */ if (start != new_res.start) - return (void __iomem *) ERR_PTR(-EINVAL); + return IOMEM_ERR_PTR(-EINVAL); if (!iores) return devm_ioremap_resource(dev, &new_res); |