From: Alexey Khoroshilov Date: Wed, 3 Jul 2013 19:17:34 +0000 (-0300) Subject: [media] hdpvr: fix iteration over uninitialized lists in hdpvr_probe() X-Git-Tag: v3.12-rc1~135^2~5 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2e923a0527ac439e135b9961e58d3acd876bba10;p=pandora-kernel.git [media] hdpvr: fix iteration over uninitialized lists in hdpvr_probe() free_buff_list and rec_buff_list are initialized in the middle of hdpvr_probe(), but if something bad happens before that, error handling code calls hdpvr_delete(), which contains iteration over the lists (via hdpvr_free_buffers()). The patch moves the lists initialization to the beginning and by the way fixes goto label in error handling of registering videodev. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Cc: stable@vger.kernel.org --- Reading git-diff-tree failed