From 106ff9e013f60e2f40687d4f8b43c164873b5544 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Fri, 15 Jul 2011 08:49:06 -0300 Subject: Revert "[media] DVB: dvb_frontend: off by one in dtv_property_dump()" This reverts commit a3e4adf274f86b2363fedaa964297cb38526cef0. As pointed by Andread Oberritter : 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 Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb/dvb-core/dvb_frontend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c index 21c9072ed99f..efe9c30605e8 100644 --- a/drivers/media/dvb/dvb-core/dvb_frontend.c +++ b/drivers/media/dvb/dvb-core/dvb_frontend.c @@ -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; -- cgit v1.2.2