Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1338257pxa; Sun, 2 Aug 2020 04:16:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzBmqmVUrLLVNVRW/uj349o1aekb6BzXS+61zdS3w93Rs5V3YnEGRvDe0FWM2N5rc0VeCum X-Received: by 2002:a05:6402:3048:: with SMTP id bu8mr11735036edb.367.1596366978934; Sun, 02 Aug 2020 04:16:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596366978; cv=none; d=google.com; s=arc-20160816; b=OY7otgIgyJRzPzBSBlivixaoEsOszfaxB0Le8MDzOJMSPlHCXhVJtirsoPRzk+iRDR UVpOdSb1BERZBqtpNYrnG0XxYuRdFd7i0hLyT+ZYaGGhQ7y6dQx7y7mMBeYTTr6vXCog IB8kMFP7gs/J+6dt7oKSFnorKNDemcRr32WBjr8Apw+eoIMKWl+3kQWJtEp7CDnKlO5j uxbQFr/asrzw2NUNDqYlmR5TOLeDrW3KhFOobn5MsOiaz5miGZKXOcyLhSOyxqw7XDh3 tJN4GwRLL4DJPFT/3u9BgmjFBc/vlyIEzr0S0VLmcwpUfykq4BwG2KeQ8qZvR93i8ywe dTbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=k6lk/0MBJXor+kSTwJP1g2H/hgvgiOUjCLqeuBKxVRs=; b=S62kfD/i1UCrBPg5v5Zu4xIgLuwuEmi1WeYRJQCouh/UfwjvW+zjPa/MhcoyP0mihw XdCYFQPVjNzWIe3UJuvCZeVxNkXrxP6PmrokJE/lUZzCN+n1MqHAOIs1T4yyIkjvpo4h 2R48JhoF5vwaEvbGAfwPoK9iHxnhIXFZhlkKhKTouCx1McOGdvRE5fBy4FWWM+XxPN0j nuvGl0qBuIER089S+WlNJG4ykMQSPC0zNQJ/cW8cid8aF+9hKp/AmMWWRwEjWNjIFH4v pMMzTEO1+5yf0xQ9ZuYS163rRWliJlwD68Da3HoXtw+xeZxH2785+AvCuiT336WeotZu ALEA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w27si8388928eja.225.2020.08.02.04.15.56; Sun, 02 Aug 2020 04:16:18 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728228AbgHBLPm (ORCPT + 99 others); Sun, 2 Aug 2020 07:15:42 -0400 Received: from out30-44.freemail.mail.aliyun.com ([115.124.30.44]:54838 "EHLO out30-44.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728183AbgHBLPj (ORCPT ); Sun, 2 Aug 2020 07:15:39 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R211e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04426;MF=tianjia.zhang@linux.alibaba.com;NM=1;PH=DS;RN=16;SR=0;TI=SMTPD_---0U4TqfqO_1596366935; Received: from localhost(mailfrom:tianjia.zhang@linux.alibaba.com fp:SMTPD_---0U4TqfqO_1596366935) by smtp.aliyun-inc.com(127.0.0.1); Sun, 02 Aug 2020 19:15:35 +0800 From: Tianjia Zhang To: jani.nikula@linux.intel.com, joonas.lahtinen@linux.intel.com, rodrigo.vivi@intel.com, airlied@linux.ie, daniel@ffwll.ch, ville.syrjala@linux.intel.com, jose.souza@intel.com, maarten.lankhorst@linux.intel.com, chris@chris-wilson.co.uk, manasi.d.navare@intel.com, wambui.karugax@gmail.com, stanislav.lisovskiy@intel.com Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, tianjia.zhang@alibaba.com Subject: [PATCH] drm/i915: Fix wrong return value in intel_atomic_check() Date: Sun, 2 Aug 2020 19:15:35 +0800 Message-Id: <20200802111535.5200-1-tianjia.zhang@linux.alibaba.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In the case of calling check_digital_port_conflicts() failed, a negative error code -EINVAL should be returned. Fixes: bf5da83e4bd80 ("drm/i915: Move check_digital_port_conflicts() earier") Cc: Ville Syrjälä Signed-off-by: Tianjia Zhang --- drivers/gpu/drm/i915/display/intel_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c index 26996e1839e2..9f3a7ef58aba 100644 --- a/drivers/gpu/drm/i915/display/intel_display.c +++ b/drivers/gpu/drm/i915/display/intel_display.c @@ -14872,7 +14872,7 @@ static int intel_atomic_check(struct drm_device *dev, if (any_ms && !check_digital_port_conflicts(state)) { drm_dbg_kms(&dev_priv->drm, "rejecting conflicting digital port configuration\n"); - ret = EINVAL; + ret = -EINVAL; goto fail; } -- 2.26.2