Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751673AbdFORy1 (ORCPT ); Thu, 15 Jun 2017 13:54:27 -0400 Received: from anholt.net ([50.246.234.109]:55264 "EHLO anholt.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750727AbdFORy0 (ORCPT ); Thu, 15 Jun 2017 13:54:26 -0400 From: Eric Anholt To: dri-devel@lists.freedesktop.org, Archit Taneja , Andrzej Hajda , Laurent Pinchart Cc: linux-kernel@vger.kernel.org, Eric Anholt Subject: [PATCH] bridge: Fix panel-bridge error return on !panel. Date: Thu, 15 Jun 2017 10:54:23 -0700 Message-Id: <20170615175423.17954-1-eric@anholt.net> X-Mailer: git-send-email 2.11.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 638 Lines: 22 ERR_PTR() needs a negative errno argument. Signed-off-by: Eric Anholt --- drivers/gpu/drm/bridge/panel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bridge/panel.c b/drivers/gpu/drm/bridge/panel.c index 99f9a4beb859..67fe19e5a9c6 100644 --- a/drivers/gpu/drm/bridge/panel.c +++ b/drivers/gpu/drm/bridge/panel.c @@ -161,7 +161,7 @@ struct drm_bridge *drm_panel_bridge_add(struct drm_panel *panel, int ret; if (!panel) - return ERR_PTR(EINVAL); + return ERR_PTR(-EINVAL); panel_bridge = devm_kzalloc(panel->dev, sizeof(*panel_bridge), GFP_KERNEL); -- 2.11.0