Input: rotary-encoder - don't log EPROBE_DEFER to kernel log
authorUwe Kleine-König <uwe@kleine-koenig.org>
Wed, 5 Dec 2018 01:58:55 +0000 (17:58 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Sun, 9 Dec 2018 05:52:09 +0000 (21:52 -0800)
When a driver fails to bind because a resource it still missing it's not
helpful to report this as (usually) probing is repeated later.

Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/misc/rotary_encoder.c

index 1588aecafff79d8fdb54d80b7fa03a2ee9036f00..72eee6d5552720f040752347246e904873f58b37 100644 (file)
@@ -240,8 +240,10 @@ static int rotary_encoder_probe(struct platform_device *pdev)
 
        encoder->gpios = devm_gpiod_get_array(dev, NULL, GPIOD_IN);
        if (IS_ERR(encoder->gpios)) {
-               dev_err(dev, "unable to get gpios\n");
-               return PTR_ERR(encoder->gpios);
+               err = PTR_ERR(encoder->gpios);
+               if (err != -EPROBE_DEFER)
+                       dev_err(dev, "unable to get gpios: %d\n", err);
+               return err;
        }
        if (encoder->gpios->ndescs < 2) {
                dev_err(dev, "not enough gpios found\n");