All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Adrian Bunk <bunk@kernel.org>
Cc: adaplas@gmail.com, linux-kernel@vger.kernel.org,
	Thomas Winischhofer <thomas@winischhofer.net>
Subject: Re: [2.6 patch] video/sis/: fix negative array index
Date: Thu, 1 Nov 2007 15:21:31 -0700	[thread overview]
Message-ID: <20071101152131.3f657cc4.akpm@linux-foundation.org> (raw)
In-Reply-To: <20071027141946.GX30533@stusta.de>

On Sat, 27 Oct 2007 16:19:46 +0200
Adrian Bunk <bunk@kernel.org> wrote:

> --- a/drivers/video/sis/sis_main.c
> +++ b/drivers/video/sis/sis_main.c
> @@ -1245,24 +1245,25 @@ sisfb_do_set_var(struct fb_var_screeninfo *var, int isactive, struct fb_info *in
>  		ivideo->sisfb_mode_idx++;
>  	}
>  
>  	if(found_mode) {
>  		ivideo->sisfb_mode_idx = sisfb_validate_mode(ivideo,
>  				ivideo->sisfb_mode_idx, ivideo->currentvbflags);
> -		ivideo->mode_no = sisbios_mode[ivideo->sisfb_mode_idx].mode_no[ivideo->mni];
>  	} else {
>  		ivideo->sisfb_mode_idx = -1;
>  	}
>  
>         	if(ivideo->sisfb_mode_idx < 0) {
>  		printk(KERN_ERR "sisfb: Mode %dx%dx%d not supported\n", var->xres,
>  		       var->yres, var->bits_per_pixel);
>  		ivideo->sisfb_mode_idx = old_mode;
>  		return -EINVAL;
>  	}
>  
> +	ivideo->mode_no = sisbios_mode[ivideo->sisfb_mode_idx].mode_no[ivideo->mni];

oic, sisfb_validate_mode() could have returned a -ve error code.

Please use the changelog to fully explain your patches.

      parent reply	other threads:[~2007-11-01 22:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-27 14:19 [2.6 patch] video/sis/: fix negative array index Adrian Bunk
2007-11-01 22:17 ` Andrew Morton
2007-11-01 22:21 ` Andrew Morton [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=20071101152131.3f657cc4.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=adaplas@gmail.com \
    --cc=bunk@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=thomas@winischhofer.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.