drm/msm/dsi: Fix return value check for clk_get_parent
authorSean Paul <seanpaul@chromium.org>
Wed, 7 Aug 2019 18:51:50 +0000 (14:51 -0400)
committerRob Clark <robdclark@chromium.org>
Tue, 3 Sep 2019 23:17:02 +0000 (16:17 -0700)
commit5fb9b797d5ccf311ae4aba69e86080d47668b5f7
tree889e4793e0f8745a183d2034afff926292c61d59
parentd934a712c5e6a3724dd560b8e92eb230b025ee8d
drm/msm/dsi: Fix return value check for clk_get_parent

clk_get_parent returns an error pointer upon failure, not NULL. So the
checks as they exist won't catch a failure. This patch changes the
checks and the return values to properly handle an error pointer.

Fixes: c4d8cfe516dc ("drm/msm/dsi: add implementation for helper functions")
Cc: Sibi Sankar <sibis@codeaurora.org>
Cc: Sean Paul <seanpaul@chromium.org>
Cc: Rob Clark <robdclark@chromium.org>
Cc: <stable@vger.kernel.org> # v4.19+
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Rob Clark <robdclark@chromium.org>
drivers/gpu/drm/msm/dsi/dsi_host.c