From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wei Yongjun Subject: [PATCH -next] drm/arm: mali-dp: Fix error return code in malidp_bind() Date: Thu, 28 Jul 2016 02:14:26 +0000 Message-ID: <1469672066-13401-1-git-send-email-weiyj.lk@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: Sender: linux-kernel-owner@vger.kernel.org To: Liviu Dudau , Brian Starkey , Mali DP Maintainers , David Airlie Cc: Wei Yongjun , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org List-Id: dri-devel@lists.freedesktop.org Fix to return error code -EINVAL from the error handling case instead of 0, as done elsewhere in this function. Fixes: 3c31760e760c ('drm/arm: mali-dp: Set crtc.port to the port instead of the endpoint') Signed-off-by: Wei Yongjun --- drivers/gpu/drm/arm/malidp_drv.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/arm/malidp_drv.c b/drivers/gpu/drm/arm/malidp_drv.c index 4e61ea5..44b24cb 100644 --- a/drivers/gpu/drm/arm/malidp_drv.c +++ b/drivers/gpu/drm/arm/malidp_drv.c @@ -362,8 +362,10 @@ static int malidp_bind(struct device *dev) /* Set the CRTC's port so that the encoder component can find it */ ep = of_graph_get_next_endpoint(dev->of_node, NULL); - if (!ep) + if (!ep) { + ret = -EINVAL; goto port_fail; + } malidp->crtc.port = of_get_next_parent(ep); ret = component_bind_all(dev, drm);