Skip to content

Commit

Permalink
[media] Revert "[media] ivtv: avoid going past input/audio array"
Browse files Browse the repository at this point in the history
This patch broke ivtv logic, as reported at
 https://bugzilla.redhat.com/show_bug.cgi?id=1278942

This reverts commit 09290cc.

Cc: stable@vger.kernel.org # for v4.1 and upper
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
  • Loading branch information
Mauro Carvalho Chehab committed Dec 18, 2015
1 parent 8005c49 commit dfcf36d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/media/pci/ivtv/ivtv-driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -805,11 +805,11 @@ static void ivtv_init_struct2(struct ivtv *itv)
{
int i;

for (i = 0; i < IVTV_CARD_MAX_VIDEO_INPUTS - 1; i++)
for (i = 0; i < IVTV_CARD_MAX_VIDEO_INPUTS; i++)
if (itv->card->video_inputs[i].video_type == 0)
break;
itv->nof_inputs = i;
for (i = 0; i < IVTV_CARD_MAX_AUDIO_INPUTS - 1; i++)
for (i = 0; i < IVTV_CARD_MAX_AUDIO_INPUTS; i++)
if (itv->card->audio_inputs[i].audio_type == 0)
break;
itv->nof_audio_inputs = i;
Expand Down

0 comments on commit dfcf36d

Please sign in to comment.