diff mbox

[v2] radio-bcm2048.c: fix wrong overflow check

Message ID 20140420145622.GA15567@amd.pavel.ucw.cz (mailing list archive)
State New, archived
Headers show

Commit Message

Pavel Machek April 22, 2014, 12:39 p.m. UTC
From: Pali Rohár <pali.rohar@gmail.com>

This patch fixes an off by one check in bcm2048_set_region().

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
v2: Send it to the correct list.  Re-work the changelog.

This patch has been floating around for four months but Pavel and Pali
are knuckle-heads and don't know how to use get_maintainer.pl so they
never send it to linux-media.

Also Pali doesn't give reporter credit and Pavel steals authorship
credit.

Also when you try explain to them about how to send patches correctly
they complain that they have been trying but it is too much work so now
I have to do it.  During the past four months thousands of other people
have been able to send patches in the correct format to the correct list
but it is too difficult for Pavel and Pali...  *sigh*.

Comments

Dan Carpenter April 22, 2014, 1:02 p.m. UTC | #1
On Tue, Apr 22, 2014 at 11:38:36AM +0200, Pavel Machek wrote:
> Feel free to resubmit the patch yourself.

No problem.  Happy to help.

regards,
dan carpenter

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Greg KH April 22, 2014, 4:41 p.m. UTC | #2
On Tue, Apr 22, 2014 at 11:38:36AM +0200, Pavel Machek wrote:
> On Tue 2014-04-22 12:16:56, Dan Carpenter wrote:
> > On Tue, Apr 22, 2014 at 10:55:53AM +0200, Pali Rohár wrote:
> > > On Tuesday 22 April 2014 10:39:17 Dan Carpenter wrote:
> > > > On Sun, Apr 20, 2014 at 04:56:22PM +0200, Pavel Machek wrote:
> > > > > Fix wrong overflow check in radio-bcm2048.
> > > > > 
> > > > > Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
> > > > > Signed-off-by: Pavel Machek <pavel@ucw.cz>
> > > > 
> > > > Signed off means like you're signing a legal document to show
> > > > that you didn't do anything illegal when you handled the
> > > > patch.  Was this patch authored by Pali?  If so, then use the
> > > > From: header.
> > > > 
> > > > Btw, I reported this bug on Dec 10 last year.  It's better
> > > > that we fix it now than not fix it at all but we could have
> > > > done better.  Was the kbuild-zero-day bug report format
> > > > confusing or how could I have helped out there?
> > > > 
> > > > regards,
> > > > dan carpenter
> > > 
> > > Hello, I sent this patch months ago, but not generated by
> > > commmand git format-patch.
> > 
> > You should still have recieved authorship credit instead of Pavel.  It's
> > a newbie mistake which I have made myself.  Pavel, use the From: header
> > to give authorship credit.  It goes on the first line of the email.
> > 
> > Did you send it to the correct list?  This patch should have gone to
> > linux-media@vger.kernel.org.  I see now that they are not CC'd.  Please
> > resend it to the correct list.
> 
> How many more mails need to be generated for single line trivial
> patch? It is staging driver, so Greg should take it. Anyway, cc-ed the
> list now.

I don't take drivers/staging/media/ patches, please use
get_maintainer.pl to see who does.

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/staging/media/bcm2048/radio-bcm2048.c b/drivers/staging/media/bcm2048/radio-bcm2048.c
index b2cd3a8..bbf236e 100644
--- a/drivers/staging/media/bcm2048/radio-bcm2048.c
+++ b/drivers/staging/media/bcm2048/radio-bcm2048.c
@@ -737,7 +737,7 @@  static int bcm2048_set_region(struct bcm2048_device *bdev, u8 region)
 	int err;
 	u32 new_frequency = 0;
 
-	if (region > ARRAY_SIZE(region_configs))
+	if (region >= ARRAY_SIZE(region_configs))
 		return -EINVAL;
 
 	mutex_lock(&bdev->mutex);