From: Nicolas Ferre <nicolas.ferre@microchip.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>,
Ludovic Desroches <ludovic.desroches@microchip.com>,
Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>,
Tomi Valkeinen <tomi.valkeinen@ti.com>,
<linux-fbdev@vger.kernel.org>, <dri-devel@lists.freedesktop.org>,
<kernel-janitors@vger.kernel.org>
Subject: Re: [PATCH] video: fbdev: atmel_lcdfb: fix an error code in atmel_lcdfb_probe()
Date: Fri, 3 Dec 2021 14:30:47 +0100 [thread overview]
Message-ID: <b09117ad-40bb-4abb-1f40-c31c5ca5989b@microchip.com> (raw)
In-Reply-To: <20211203095808.GE2480@kili>
On 03/12/2021 at 10:58, Dan Carpenter wrote:
> If "sinfo->config" is not found, then return -ENODEV. Don't
> return success.
>
> Fixes: b985172b328a ("video: atmel_lcdfb: add device tree suport")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Looks good to me: thanks Dan!
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Best regards,
Nicolas
> ---
> drivers/video/fbdev/atmel_lcdfb.c | 11 ++++++-----
> 1 file changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/video/fbdev/atmel_lcdfb.c b/drivers/video/fbdev/atmel_lcdfb.c
> index 355b6120dc4f..1fc8de4ecbeb 100644
> --- a/drivers/video/fbdev/atmel_lcdfb.c
> +++ b/drivers/video/fbdev/atmel_lcdfb.c
> @@ -1062,15 +1062,16 @@ static int __init atmel_lcdfb_probe(struct platform_device *pdev)
>
> INIT_LIST_HEAD(&info->modelist);
>
> - if (pdev->dev.of_node) {
> - ret = atmel_lcdfb_of_init(sinfo);
> - if (ret)
> - goto free_info;
> - } else {
> + if (!pdev->dev.of_node) {
> dev_err(dev, "cannot get default configuration\n");
> goto free_info;
> }
>
> + ret = atmel_lcdfb_of_init(sinfo);
> + if (ret)
> + goto free_info;
> +
> + ret = -ENODEV;
> if (!sinfo->config)
> goto free_info;
>
> --
> 2.20.1
>
--
Nicolas Ferre
prev parent reply other threads:[~2021-12-03 13:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-03 9:58 [PATCH] video: fbdev: atmel_lcdfb: fix an error code in atmel_lcdfb_probe() Dan Carpenter
2021-12-03 13:30 ` Nicolas Ferre [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b09117ad-40bb-4abb-1f40-c31c5ca5989b@microchip.com \
--to=nicolas.ferre@microchip.com \
--cc=alexandre.belloni@bootlin.com \
--cc=dan.carpenter@oracle.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=ludovic.desroches@microchip.com \
--cc=plagnioj@jcrosoft.com \
--cc=tomi.valkeinen@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).