staging: fsl-mc: do not print error in case of defer probe error
authorNipun Gupta <nipun.gupta@nxp.com>
Mon, 11 Dec 2017 15:45:38 +0000 (21:15 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Dec 2017 11:40:41 +0000 (12:40 +0100)
Devices on MC bus can be deferred because of dependencies on other modules
(such as IOMMU). Those are not the actual errors; as probing is again
done by the kernel at later stages. So this patch avoids the error print
in such case.

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/fsl-mc/bus/fsl-mc-bus.c

index f15bab32fb2f326e871dedc1e4986902ce7d3015..664cc8cbae65910ffa931d6da8c46570fa89744f 100644 (file)
@@ -228,7 +228,8 @@ static int fsl_mc_driver_probe(struct device *dev)
 
        error = mc_drv->probe(mc_dev);
        if (error < 0) {
-               dev_err(dev, "%s failed: %d\n", __func__, error);
+               if (error != -EPROBE_DEFER)
+                       dev_err(dev, "%s failed: %d\n", __func__, error);
                return error;
        }