mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Andrey Gusakov <andrey.gusakov@cogentembedded.com>
Cc: barebox@lists.infradead.org, cphealy@gmail.com
Subject: Re: [PATCH] video: tc358767: set num_modes=0 if no valid mode found
Date: Mon, 26 Mar 2018 09:25:24 +0200	[thread overview]
Message-ID: <20180326072524.tated4gxccrlemgg@pengutronix.de> (raw)
In-Reply-To: <1521825143-9979-1-git-send-email-andrey.gusakov@cogentembedded.com>

On Fri, Mar 23, 2018 at 08:12:23PM +0300, Andrey Gusakov wrote:
> Since commit f986661 "video: ipu: register framebuffer,
> even when no modes are found" value returned from
> VPL_GET_VIDEOMODES ioctl is ignored. So set valid num_modes
> in error case to avoid crash in register_framebuffer.
> 
> Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com>
> ---
>  drivers/video/tc358767.c | 1 +
>  1 file changed, 1 insertion(+)

Applied, thanks

Sascha

> 
> diff --git a/drivers/video/tc358767.c b/drivers/video/tc358767.c
> index 5ad5cb4..d4749b1 100644
> --- a/drivers/video/tc358767.c
> +++ b/drivers/video/tc358767.c
> @@ -1258,6 +1258,7 @@ static int tc_filter_videomodes(struct tc_data *tc, struct display_timings *timi
>  	} while (1);
>  
>  	free(timings->modes);
> +	timings->num_modes = 0;
>  	timings->modes = NULL;
>  
>  	if (!num_modes) {
> -- 
> 1.9.1
> 
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

      reply	other threads:[~2018-03-26  7:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-23 17:12 Andrey Gusakov
2018-03-26  7:25 ` Sascha Hauer [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=20180326072524.tated4gxccrlemgg@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=andrey.gusakov@cogentembedded.com \
    --cc=barebox@lists.infradead.org \
    --cc=cphealy@gmail.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