]> git.baikalelectronics.ru Git - kernel.git/commit
[media] si2165: Refactoring for si2165_writereg_mask8()
authorMarkus Elfring <elfring@users.sourceforge.net>
Sun, 27 Dec 2015 17:23:57 +0000 (15:23 -0200)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Mon, 25 Jan 2016 17:15:38 +0000 (15:15 -0200)
commit32f005526dcad2285dd4184509278741587bd238
tree6cf404a6e15d8c0cc4ae3038ca97dae16d4cee90
parent39c7fdfa9a71b285b5e1810ec1ab9d8c2c3a0f15
[media] si2165: Refactoring for si2165_writereg_mask8()

This issue was detected by using the Coccinelle software.

1. Let us return directly if a call of the si2165_readreg8()
   function failed.

2. Reduce the scope for the local variables "ret" and "tmp" to one branch
   of an if statement.

3. Delete the jump label "err" then.

4. Return the value from a call of the si2165_writereg8() function
   without using an extra assignment for the variable "ret" at the end.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/dvb-frontends/si2165.c