]> git.baikalelectronics.ru Git - kernel.git/commit
drm/tilcdc: fix wrong error handling
authorDaniel Schultz <d.schultz@phytec.de>
Fri, 23 Sep 2016 10:52:49 +0000 (12:52 +0200)
committerJyri Sarha <jsarha@ti.com>
Fri, 23 Sep 2016 12:12:57 +0000 (15:12 +0300)
commit02c9419614e4ecfdb87664c3b478023676d1ef1f
treed6e4534562fdaee5e6e147f898a88f81a443b405
parentcd2dba439a2f69cee34c4915d7b66b0750c6103d
drm/tilcdc: fix wrong error handling

When 'component_bind_all' fails it should not try to unbind components
in the error handling. This will produce a null pointer kernel panic when
no component exist.

This patch changes the order of the error handling. Now, it will only
unbind components if the are bound. Otherwise, the module will jump to
an error label below.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Jyri Sarha <jsarha@ti.com>
drivers/gpu/drm/tilcdc/tilcdc_drv.c