]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
[media] c8sectpfe: fix return of garbage
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>
Thu, 17 Sep 2015 10:12:54 +0000 (07:12 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Sat, 3 Oct 2015 14:14:36 +0000 (11:14 -0300)
commit2c5535d3f0c9f7ca498f40d452d2f4ed948fe29c
treeb69668c9e14bd405c173fe6874bbf94fed5b87c8
parent98ef304e1907d3241022319cc622ec9a9ace61aa
[media] c8sectpfe: fix return of garbage

The variable err was never initialized, that means we had been checking
a garbage value in the for loop. Moreover if the segment is not outside
the firmware file then also we have been returning the garbage.
Initialize it to 0 so that on success we return the value and no need to
check in the for loop also as it is initially 0 and whenever that value
changes we have done a break from the loop.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c