On Tue, Apr 20, 2021 at 11:10:45AM +0800, Tian Tao wrote: > Function returns 'void __iomem *' so use IOMEM_ERR_PTR for returning > an error. You should also tell why we want to to use IOMEM_ERR_PTR in the description. If it makes sense, then you should know why it makes sense. > > Signed-off-by: Tian Tao <tiantao6@xxxxxxxxxxxxx> > --- > drivers/char/tpm/tpm_crb.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/char/tpm/tpm_crb.c b/drivers/char/tpm/tpm_crb.c > index a9dcf31..1860665 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); > -- > 2.7.4 > > /Jarkko