提交 7937bd53 编写于 作者: T Tian Tao 提交者: Jarkko Sakkinen

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: NTian Tao <tiantao6@hisilicon.com>
Reviewed-by: NJarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: NJarkko Sakkinen <jarkko@kernel.org>
上级 0c18f29a
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册