]> git.baikalelectronics.ru Git - kernel.git/commit
[media] lirc_imon: simplify error handling code
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>
Fri, 5 Jun 2015 14:06:46 +0000 (11:06 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Fri, 5 Jun 2015 14:26:48 +0000 (11:26 -0300)
commit1a6fdbda2b39464c04359619c027437482ffb2d9
tree84f7e0ec0e3b33b791484f5d1d0b9ea0b1c73a97
parent926eb1d4042028019fc3cc313e430ae8d1245c15
[media] lirc_imon: simplify error handling code

Instead of using a state machine and a switch with lots of
fall-trough, use gotos and cleanup the error handling loop.

That removes those two smatch warnings:
drivers/staging/media/lirc/lirc_imon.c:933 imon_probe() warn: possible memory leak of 'context'
drivers/staging/media/lirc/lirc_imon.c:933 imon_probe() warn: possible memory leak of 'driver'

And make the error handling code more standard.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/staging/media/lirc/lirc_imon.c