From patchwork Thu Aug 3 14:11:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Denis Arefev X-Patchwork-Id: 130697 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f41:0:b0:3e4:2afc:c1 with SMTP id v1csp1242257vqx; Thu, 3 Aug 2023 08:56:39 -0700 (PDT) X-Google-Smtp-Source: APBJJlFGU7tmb4qUm7VJjvlGEvmXQnYjzgBppwdohKm7Zc6tuWumJzVcyz0dk3in6Cne7TkkbfNl X-Received: by 2002:a05:6a20:3d8e:b0:133:1d62:dcbd with SMTP id s14-20020a056a203d8e00b001331d62dcbdmr23164953pzi.28.1691078199258; Thu, 03 Aug 2023 08:56:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691078199; cv=none; d=google.com; s=arc-20160816; b=Xx7istBjyohA7uaLcLlI+pjCEsLX2Ie7M5l2K5FInIjIT3lYc+kZ59lKOPYj0ROBIy y5QzLCdCx3C9okOrw/K38GLoJMHbVEiYFuzxEWsEb2lmcAgtHlycjWzoj0qzbvn5KQ2g HDIGIvHvyug94JlIq1n5ySAVS7G6e7YtoSeveG1l/f/mOZBieSb6ZWuaAxkfn4oF40yg zLNcu7Th0UT5RFuoSfjYxQRxd/ZRCBFjzKvcaraFKjnbqOVSQWk+N+wDb1s3BNCFt4Bg u5kFjwue6pIXykcqbL+Q6wTlCkJt7S3nFUakQgUpXZDummPAN391ThlrNnZtCDl6sm6Q El0g== 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 :message-id:date:subject:cc:to:dkim-signature:from; bh=Wwx6Ta6AHqq3TcGW8bDS4dyENTyGmjacKacctkGambU=; fh=B4EbdTJYR9S9Eo9bf9rSsGwCcY+j0afGV9SvWVtKj9A=; b=ZMvHf/vVjPRWjO2kjpoBXzIny1mSYcttvVeQq6sm7fapcM+yaSrWHMrPIBmLFRCc7k A5k2sc6xC1VZDIOveNXrkX4smdsfviMh25XK9ZVi9e/pNHa+yu4LxhhDRRqBeEkIIiSa Mq51qhbixS3aGnUh9pe2vuuIOw5L0qLvNwp5qUlFpXxrr4YY7ZvegX9JSRMavs2aInKp /dBXRZkCU0YCrO3ETVnrRIlZyxB4ekEiEQOhQj127UjT1A9rAtJoeT4Ip2YGBVvNn7RN h+eJpKCXKLOSyA9quFkPydFI6a2TF1TvTVxYX+IYi7cwDnCWpAGg2bfEaesI4+MRB5DL 4OWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@swemel.ru header.s=mail header.b=SVNHybaD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=swemel.ru Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b14-20020a631b4e000000b00563ff9573desi82661pgm.317.2023.08.03.08.56.24; Thu, 03 Aug 2023 08:56:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@swemel.ru header.s=mail header.b=SVNHybaD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=swemel.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235142AbjHCOSO (ORCPT + 99 others); Thu, 3 Aug 2023 10:18:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35120 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236384AbjHCOSD (ORCPT ); Thu, 3 Aug 2023 10:18:03 -0400 X-Greylist: delayed 395 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Thu, 03 Aug 2023 07:17:59 PDT Received: from mx.swemel.ru (mx.swemel.ru [95.143.211.150]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D12FFDA for ; Thu, 3 Aug 2023 07:17:59 -0700 (PDT) From: Denis Arefev DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=swemel.ru; s=mail; t=1691071876; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=Wwx6Ta6AHqq3TcGW8bDS4dyENTyGmjacKacctkGambU=; b=SVNHybaDXO7SxMWdFbZblKTdyyFkRoiYZQcaKlUxbxzbcVAdbKxYxPGC5CPwCH2clX7nhS picfAtFTw01T80c7e1s2RP/e1bbR16gQsGvSdfYdGy0sftTwtP4e8AsPCNdIbU0+FQsjGh ZnIjvQUSnrniQv3p+J8kgTlGv0ex0bs= To: Harry Wentland Cc: Leo Li , Rodrigo Siqueira , Alex Deucher , =?utf-8?q?Christian_K=C3=B6nig?= , "Pan, Xinhui" , David Airlie , Daniel Vetter , Wenjing Liu , Jun Lei , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, lvc-project@linuxtesting.org, trufanov@swemel.ru, vfh@swemel.ru Subject: [PATCH] drm/amd/display: Return value of function Date: Thu, 3 Aug 2023 17:11:16 +0300 Message-Id: <20230803141116.58883-1-arefev@swemel.ru> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773224013771471165 X-GMAIL-MSGID: 1773224013771471165 Added return value check hpd_enable Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Denis Arefev --- drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c b/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c index fa314493ffc5..bf2f620aeb66 100644 --- a/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c +++ b/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c @@ -1645,7 +1645,7 @@ void dce110_link_encoder_enable_hpd(struct link_encoder *enc) uint32_t hpd_enable = 0; uint32_t value = dm_read_reg(ctx, addr); - get_reg_field_value(hpd_enable, DC_HPD_CONTROL, DC_HPD_EN); + hpd_enable = get_reg_field_value(hpd_enable, DC_HPD_CONTROL, DC_HPD_EN); if (hpd_enable == 0) set_reg_field_value(value, 1, DC_HPD_CONTROL, DC_HPD_EN);