]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: davinci: dm646x-evm: Simplify error handling in 'evm_sw_setup()'
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sat, 21 Mar 2020 08:58:36 +0000 (09:58 +0100)
committerSekhar Nori <nsekhar@ti.com>
Tue, 21 Jul 2020 19:04:21 +0000 (00:34 +0530)
commit4b0f8391edb58bad3d43c430d13146e8a12f754e
treed7563ea9f1aba2817b724ae9cc4a42042ee249ed
parentba08cba895537751af444b33f85019339cd3c324
ARM: davinci: dm646x-evm: Simplify error handling in 'evm_sw_setup()'

There is no need to call 'gpio_free(evm_sw_gpio[i])' for these error
handling cases, it is already done in the error handling path at label
'out_free'.

Simplify the code and axe a few LoC.

While at it, also explicitly return 0 in the normal path.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
arch/arm/mach-davinci/board-dm646x-evm.c