Skip to content

Commit 7937bd5

Browse files
Tian Taojarkkojs
authored andcommitted
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>
1 parent 0c18f29 commit 7937bd5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/char/tpm/tpm_crb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ static void __iomem *crb_map_res(struct device *dev, struct resource *iores,
464464

465465
/* Detect a 64 bit address on a 32 bit system */
466466
if (start != new_res.start)
467-
return (void __iomem *) ERR_PTR(-EINVAL);
467+
return IOMEM_ERR_PTR(-EINVAL);
468468

469469
if (!iores)
470470
return devm_ioremap_resource(dev, &new_res);

0 commit comments

Comments
 (0)