• Mauro Carvalho Chehab's avatar
    [media] lirc_imon: simplify error handling code · af8a819a
    Mauro Carvalho Chehab authored
    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: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
    af8a819a
lirc_imon.c 24.1 KB