crypto: sahara - Use return value of devm_request_irq() on error
authorAlexander Shiyan <shc_work@mail.ru>
Mon, 10 Mar 2014 12:13:32 +0000 (20:13 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Mon, 10 Mar 2014 12:13:32 +0000 (20:13 +0800)
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/sahara.c

index 894468fdb02d66d98e25e0e0df1b16db763d96f9..07a5987ce67d4783a1ffd3dbecc6151efb791d4a 100644 (file)
@@ -896,10 +896,11 @@ static int sahara_probe(struct platform_device *pdev)
                return irq;
        }
 
-       if (devm_request_irq(&pdev->dev, irq, sahara_irq_handler,
-               0, SAHARA_NAME, dev) < 0) {
+       err = devm_request_irq(&pdev->dev, irq, sahara_irq_handler,
+                              0, dev_name(&pdev->dev), dev);
+       if (err) {
                dev_err(&pdev->dev, "failed to request irq\n");
-               return -ENOENT;
+               return err;
        }
 
        /* clocks */