]> git.baikalelectronics.ru Git - kernel.git/commit
mcb: Fix an error handling path in 'chameleon_parse_cells()'
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Tue, 29 Aug 2017 12:47:25 +0000 (14:47 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 31 Aug 2017 16:49:41 +0000 (18:49 +0200)
commit3fea90cbb41f4d07b6226c08b2e3e986b86ebd8d
tree6bb5d47702d3050f460b4225d21d3ce8bd8edfc3
parentf0b995e822dae2af32ac2b3dfe5c01eb69652dcd
mcb: Fix an error handling path in 'chameleon_parse_cells()'

If 'chameleon_get_bar()' fails, we will return 0, which mean success.
We should return the corresponding error code instead.

Remove the useless initialisation of 'ret' which was hiding the issue.
(if 'ret' is not set, gcc generates a warning ("warning: ‘ret’ may be used
uninitialized in this function"))

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mcb/mcb-parse.c