mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-31 03:35:32 -04:00
crypto: crypto4xx - move ioremapping up
There's no need for devm_platform_ioremap_resource() to be so far down. In fact, putting it up allows direct return instead of having to goto some branch. Also, remove the error message as the function complains loudly itself. No need to duplicate. Signed-off-by: Rosen Penev <rosenp@gmail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
@@ -1251,6 +1251,10 @@ static int crypto4xx_probe(struct platform_device *ofdev)
|
||||
if (!core_dev->dev)
|
||||
return -ENOMEM;
|
||||
|
||||
core_dev->dev->ce_base = devm_platform_ioremap_resource(ofdev, 0);
|
||||
if (IS_ERR(core_dev->dev->ce_base))
|
||||
return PTR_ERR(core_dev->dev->ce_base);
|
||||
|
||||
/*
|
||||
* Older version of 460EX/GT have a hardware bug.
|
||||
* Hence they do not support H/W based security intr coalescing
|
||||
@@ -1286,13 +1290,6 @@ static int crypto4xx_probe(struct platform_device *ofdev)
|
||||
tasklet_init(&core_dev->tasklet, crypto4xx_bh_tasklet_cb,
|
||||
(unsigned long) dev);
|
||||
|
||||
core_dev->dev->ce_base = devm_platform_ioremap_resource(ofdev, 0);
|
||||
if (IS_ERR(core_dev->dev->ce_base)) {
|
||||
dev_err(&ofdev->dev, "failed to ioremap resource");
|
||||
rc = PTR_ERR(core_dev->dev->ce_base);
|
||||
goto err_build_sdr;
|
||||
}
|
||||
|
||||
/* Register for Crypto isr, Crypto Engine IRQ */
|
||||
core_dev->irq = platform_get_irq(ofdev, 0);
|
||||
if (core_dev->irq < 0) {
|
||||
|
||||
Reference in New Issue
Block a user