Skip to content

Commit

Permalink
Revert "[media] DVB: dvb_frontend: off by one in dtv_property_dump()"
Browse files Browse the repository at this point in the history
This reverts commit a3e4adf274f86b2363fedaa964297cb38526cef0.

As pointed by Andread Oberritter <obi@linuxtv.org>:

	That's wrong, because the array size is DTV_MAX_COMMAND + 1.
	Using the ARRAY_SIZE macro instead might reduce the confusion.

Also, changeset 3995223038 already fixed this issue.

Reported-by: Andread Oberritter <obi@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Mauro Carvalho Chehab committed Jul 27, 2011
1 parent bded70d commit 106ff9e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/dvb/dvb-core/dvb_frontend.c
Original file line number Diff line number Diff line change
Expand Up @@ -982,7 +982,7 @@ static void dtv_property_dump(struct dtv_property *tvp)
{
int i;

if (tvp->cmd <= 0 || tvp->cmd >= DTV_MAX_COMMAND) {
if (tvp->cmd <= 0 || tvp->cmd > DTV_MAX_COMMAND) {
printk(KERN_WARNING "%s: tvp.cmd = 0x%08x undefined\n",
__func__, tvp->cmd);
return;
Expand Down

0 comments on commit 106ff9e

Please sign in to comment.