Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1339063pxa; Sun, 2 Aug 2020 04:18:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyJ5/mFia+g8ZutFOCZao6yGUNI6sed2jastlinl/W/rOkcV/PiSu6/so9o+a35pmPh6ou1 X-Received: by 2002:a17:907:7291:: with SMTP id dt17mr11884007ejc.73.1596367088442; Sun, 02 Aug 2020 04:18:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596367088; cv=none; d=google.com; s=arc-20160816; b=bRMylKpUwpPqKNd7Os5DVOLoBNtODHEa8T8709eKrmElQe/5108xOgfmwLM57/LLSf du1XisrMqygnBllllqpXIlnnI8IsTjP78yjFH4X6wRBNWkgcxZy41+/3lGxqIGQ9UB2f JEPqAb/zvnCY+3Y2h3z17HicbE53MJT9uPEPDQLMHsK2IYx5L6TEYF5tjv4yrmh/S0eT tVMhNMwEmU9nSWHfbjOXF2jkCE/PdVOTM5c/oOD4ltM3fcF9pnNsgZO8Atu3wkR9Isam qiTR9dx/Rq3J+IGC7l1zkfkAlL2A5/SsMuefaoz8ervKx1xoEcoZLjBqgBCDq0QVy/hk ahzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=m2r8MBb9UtLehKIIwGqJWjHNZSlF5FufXe2wUJZuJPg=; b=09c8uV8xOhDZFetAmoxS6Z/ywGK7c7F0P7cI0b7DxnqgtuhGgySc4jzSClNPzniCJx bji4ZAxwEWq+yUzCf5RuR5EmjylLkEx0ETvA8r4WRCFeDldmc8kzBGIL5bwy5JEzVVMw p+9s6Wl6mHIjfd7kAFxzwMLTwJfIE6guZb20FrbZBqTX9CzsDktkye+j5n+dZ3E8Yw+g 9/jHysQ3H6Uc52EalI4IwT4Ik6vhZpRO8/MyUZwb/BBQYEIw8OKgNujP8OTCQiB7Z3Iw +oLlf4lLlJdjbHyIl221pp35zJhuTxsCwCW4TanySLI7tdvIPPeHK+j/vh3qruwF7LHd FtVA== 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 z3si8093336ejc.547.2020.08.02.04.17.46; Sun, 02 Aug 2020 04:18:08 -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 S1728491AbgHBLQb (ORCPT + 99 others); Sun, 2 Aug 2020 07:16:31 -0400 Received: from out30-131.freemail.mail.aliyun.com ([115.124.30.131]:44822 "EHLO out30-131.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728132AbgHBLPm (ORCPT ); Sun, 2 Aug 2020 07:15:42 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R101e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e01422;MF=tianjia.zhang@linux.alibaba.com;NM=1;PH=DS;RN=16;SR=0;TI=SMTPD_---0U4T30DO_1596366936; Received: from localhost(mailfrom:tianjia.zhang@linux.alibaba.com fp:SMTPD_---0U4T30DO_1596366936) by smtp.aliyun-inc.com(127.0.0.1); Sun, 02 Aug 2020 19:15:37 +0800 From: Tianjia Zhang To: harry.wentland@amd.com, sunpeng.li@amd.com, alexander.deucher@amd.com, christian.koenig@amd.com, airlied@linux.ie, daniel@ffwll.ch, nicholas.kazlauskas@amd.com, Rodrigo.Siqueira@amd.com, Bhawanpreet.Lakha@amd.com, stylon.wang@amd.com, roman.li@amd.com, mikita.lipski@amd.com Cc: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, tianjia.zhang@alibaba.com Subject: [PATCH] drm/amd/display: Fix wrong return value in dm_update_plane_state() Date: Sun, 2 Aug 2020 19:15:36 +0800 Message-Id: <20200802111536.5246-1-tianjia.zhang@linux.alibaba.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On an error exit path, a negative error code should be returned instead of a positive return value. Fixes: 9e869063b0021 ("drm/amd/display: Move iteration out of dm_update_planes") Cc: Leo Li Signed-off-by: Tianjia Zhang --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 710edc70e37e..5810416e2ddc 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -8182,8 +8182,7 @@ static int dm_update_plane_state(struct dc *dc, dm_old_plane_state->dc_state, dm_state->context)) { - ret = EINVAL; - return ret; + return -EINVAL; } -- 2.26.2