[PATCH 3/3] drm: rcar-du: Convert rcar_du_encoders_init_one() return value to 0/<0

Geert Uytterhoeven geert at linux-m68k.org
Tue May 26 12:24:03 PDT 2015


On Tue, May 26, 2015 at 5:01 PM, Laurent Pinchart
<laurent.pinchart+renesas at ideasonboard.com> wrote:
> --- a/drivers/gpu/drm/rcar-du/rcar_du_kms.c
> +++ b/drivers/gpu/drm/rcar-du/rcar_du_kms.c

> @@ -640,14 +640,14 @@ static int rcar_du_encoders_init_one(struct rcar_du_device *rcdu,
>         of_node_put(connector);
>
>         if (!ret)
> -               return 1;
> +               return 0;
>
>         if (ret != -EPROBE_DEFER)
>                 dev_warn(rcdu->dev,
>                          "failed to initialize encoder %s (%d), skipping\n",
>                          encoder->full_name, ret);
>
> -       return 0;
> +       return ret;
>  }

Perhaps just

        if (ret && ret != -EPROBE_DEFER)
                dev_warn(...);

       return ret;

?

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds


More information about the dri-devel mailing list