]> git.baikalelectronics.ru Git - kernel.git/commit
[media] dvb-bt8xx: use goto based exception handling
authorJonathan Nieder <jrnieder@gmail.com>
Sat, 31 Dec 2011 10:58:34 +0000 (07:58 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Fri, 6 Jan 2012 14:43:34 +0000 (12:43 -0200)
commit63955621f5ed5b0e4e4f6f7726e0699769cc3a50
tree0bc9c094d1382ed0f760f407c77f6cb552741f5c
parent8e88a4edcaa4360666621d0e3d278cddee27ac3d
[media] dvb-bt8xx: use goto based exception handling

Repeating the same cleanup code in each error handling path makes life
unnecessarily difficult for reviewers, who much check each instance of
the same copy+pasted code separately.  A "goto" to the end of the
function is more maintainable and conveys the intent more clearly.

While we're touching this code, also lift some assignments from "if"
conditionals for simplicity.

No functional change intended.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb/bt8xx/dvb-bt8xx.c