crypto: nx - don't register pSeries driver if ENODEV
authorDan Streetman <ddstreet@ieee.org>
Wed, 22 Jul 2015 18:26:34 +0000 (14:26 -0400)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 23 Jul 2015 10:14:30 +0000 (18:14 +0800)
Don't register the pSeries driver when parsing the device tree returns
ENODEV.

The nx842_probe() function in the pSeries driver returns error instead
of registering as a crypto compression driver, when it receives an
error return value from the nx842_OF_upd() function that probes the
device tree nodes, except when ENODEV is returned.  However ENODEV
should not be a special case and the driver should not register when
there is no hw device, or the hw device is disabled.

Signed-off-by: Dan Streetman <ddstreet@ieee.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/nx/nx-842-pseries.c

index 74c53a119b0b3579f3509daa1378134b6f75c837..4b7bd8fb6a6b88d85cacd0c55b3b7a1a95a0ccdd 100644 (file)
@@ -999,11 +999,8 @@ static int nx842_probe(struct vio_dev *viodev,
        of_reconfig_notifier_register(&nx842_of_nb);
 
        ret = nx842_OF_upd(NULL);
-       if (ret && ret != -ENODEV) {
-               dev_err(&viodev->dev, "could not parse device tree. %d\n", ret);
-               ret = -1;
+       if (ret)
                goto error;
-       }
 
        rcu_read_lock();
        dev_set_drvdata(&viodev->dev, rcu_dereference(devdata));
This page took 0.0283 seconds and 5 git commands to generate.