drm/rockchip: Fix uninitialized use of ret
authorSean Paul <seanpaul@chromium.org>
Thu, 21 Sep 2017 00:13:56 +0000 (17:13 -0700)
committerSean Paul <seanpaul@chromium.org>
Thu, 21 Sep 2017 20:05:35 +0000 (13:05 -0700)
commit6bf2e0324b9376512b0b9bf5c5c4b383afd419ec
tree3334347fa7c1de3508b86933fd2cb26c96d7bcd1
parent531beb067c6185aceabfdee0965234c6a8fd133b
drm/rockchip: Fix uninitialized use of ret

If there are no children for lvds, ret is used uninitialized. This patch
initializes ret and returns an error if the port has no children.

Fixes: 34cc0aa25456 ("drm/rockchip: Add support for Rockchip Soc LVDS")
Cc: Mark Yao <mark.yao@rock-chips.com>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Sandy Huang <hjc@rock-chips.com>
Cc: dri-devel@lists.freedesktop.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-rockchip@lists.infradead.org
Reviewed-by: Mark Yao <mark.yao@rock-chips.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20170921001408.1839-1-seanpaul@chromium.org
drivers/gpu/drm/rockchip/rockchip_lvds.c