]> git.baikalelectronics.ru Git - kernel.git/commit
drm/sun4i: Fix a return value in case of error
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Fri, 18 Nov 2016 18:18:47 +0000 (19:18 +0100)
committerMaxime Ripard <maxime.ripard@free-electrons.com>
Mon, 2 Jan 2017 21:27:58 +0000 (22:27 +0100)
commit0d8901a9c923ddc1c58e62bff92e7ffc1f25584c
tree7ff9cb23cff330a322a460323316edaa4f1cad35
parent4184c0ec1ade2b73b58c41e1084d8b22fc53d09b
drm/sun4i: Fix a return value in case of error

If 'sun4i_backend_drm_format_to_layer()' does not return 0, then 'val' is
left unmodified.
As it is not initialized either, the return value can be anything.

It is likely that returning the error code was expected here.

As the only caller of 'sun4i_backend_update_layer_formats()' does not check
the return value, this fix is purely theorical.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
drivers/gpu/drm/sun4i/sun4i_backend.c