mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-04 04:02:26 +00:00
crypto: exynos - use devm_platform_ioremap_resource() to simplify code
Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: YueHaibing <yuehaibing@huawei.com> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
17729e56f9
commit
6d1c0186f3
@ -268,7 +268,6 @@ static struct rng_alg exynos_rng_alg = {
|
||||
static int exynos_rng_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct exynos_rng_dev *rng;
|
||||
struct resource *res;
|
||||
int ret;
|
||||
|
||||
if (exynos_rng_dev)
|
||||
@ -289,8 +288,7 @@ static int exynos_rng_probe(struct platform_device *pdev)
|
||||
return PTR_ERR(rng->clk);
|
||||
}
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
rng->mem = devm_ioremap_resource(&pdev->dev, res);
|
||||
rng->mem = devm_platform_ioremap_resource(pdev, 0);
|
||||
if (IS_ERR(rng->mem))
|
||||
return PTR_ERR(rng->mem);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user