Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3016912pxb; Mon, 18 Oct 2021 06:40:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxHYt3JDa/78jzJZn4xueDlQG0EhJcYtjGqD3mlFS384kGNm8CDEDIv+q1nmLrPwYoSGIBm X-Received: by 2002:a05:6a00:21c2:b0:44c:fa0b:f72 with SMTP id t2-20020a056a0021c200b0044cfa0b0f72mr28218438pfj.13.1634564449724; Mon, 18 Oct 2021 06:40:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634564449; cv=none; d=google.com; s=arc-20160816; b=Avn62qw5nVE4IP4BfX40w8nE0LdXNCzunWnpwfnEBZopv2AMNLUKXzU8DBH/NQhGus Z8QyoCB7IffvPnIhfZ865/yPyd5bdGUHJOU3+qJdh1v067T6rl69D0QCWc1L6Gtkq7oU OLYjAAmFBFn2lSKhaxs2rp15Zr85R30HOQDEHke85lLlGlIhmZl3p+yiWzKhwxzyz/s8 3yNpU87fDCglYVBQrXkAQAjlheKFrX4JNSCVpBeX3Y2lEW5S6nADkaCQeVbBvHhpVfXN BArFy1BkUJwtRMxyfvqs8w0PaWU1Rs8jUpT05UKCUBUHsOqpNz9XSTk+kUtG5/jjbH9c PY4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=z6Y8A/U/3RifHN4ic/k0kyh0trY4TRKESfK89IrVDNI=; b=LZny60dGY4CxjOlT/eS8sYVYqprTf9JvMppwezHWBpY5H5uH/upTTO4vD6Ss6fflqb P3EJdTEgJakXvk/kiQ4348Ew5Ge0sbshmypjWgvx5RPWvkOGieaI5B8Zbvss5SOKZ2Om eB8jP0Oy6JZMX7gO4+7eFiHKd79cELZ4rPWQjkW5CaKlGqm6ShXEbUZX/OojUq/Db06/ hee/V/adHLNgr64MOoPN6gwAzRcnyBdV1CoY7ifOVp067x2AkKMT5RtYBbGNTQqX/RSK IgHyCz68S6w1E1MQy57TG8j1NbPh/ndo+Cem0zMbEYqHFO1j/lTI8hT9zH4Tt5+kU5ZJ FGSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=X8UTcVJc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x22si20218564pgj.320.2021.10.18.06.40.36; Mon, 18 Oct 2021 06:40:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=X8UTcVJc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233430AbhJRNkP (ORCPT + 99 others); Mon, 18 Oct 2021 09:40:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:55128 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233378AbhJRNiM (ORCPT ); Mon, 18 Oct 2021 09:38:12 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 44BAB61411; Mon, 18 Oct 2021 13:31:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1634563909; bh=R5LU+vPINuAyX8FG70ZMRponF8JS2fZnFikI4/x5cE4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=X8UTcVJcI4tKfYX91ovzRB193Zps2IEvckm1zu27zoWjonTj6+0SrB+ItfHdGKwBS /G0t4Gvyr7uC8+y/ikIpZsRKbzWmUzcdn0s5I+VBuAkhFx/rZ3tnARyHsuT/3USRH0 x1Y0G5nQLa/iye3yCBkrc7ntptv8oPnXj9lQWv74= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Carpenter , Dmitry Baryshkov , Rob Clark Subject: [PATCH 5.4 63/69] drm/msm/dsi: Fix an error code in msm_dsi_modeset_init() Date: Mon, 18 Oct 2021 15:25:01 +0200 Message-Id: <20211018132331.556538903@linuxfoundation.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211018132329.453964125@linuxfoundation.org> References: <20211018132329.453964125@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dan Carpenter commit 739b4e7756d3301dd673ca517afca46a5f635562 upstream. Return an error code if msm_dsi_manager_validate_current_config(). Don't return success. Fixes: 8b03ad30e314 ("drm/msm/dsi: Use one connector for dual DSI mode") Signed-off-by: Dan Carpenter Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20211001123308.GF2283@kili Signed-off-by: Dmitry Baryshkov Signed-off-by: Rob Clark Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/msm/dsi/dsi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/drivers/gpu/drm/msm/dsi/dsi.c +++ b/drivers/gpu/drm/msm/dsi/dsi.c @@ -206,8 +206,10 @@ int msm_dsi_modeset_init(struct msm_dsi goto fail; } - if (!msm_dsi_manager_validate_current_config(msm_dsi->id)) + if (!msm_dsi_manager_validate_current_config(msm_dsi->id)) { + ret = -EINVAL; goto fail; + } msm_dsi->encoder = encoder;