Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2936847rwb; Mon, 15 Aug 2022 14:24:44 -0700 (PDT) X-Google-Smtp-Source: AA6agR65NvgFZrfdSuimUujhjWFeBOfVhzN8RYnL4ZsAyqilmkeBbIEASzUFTTonlxc1KhM6TxdT X-Received: by 2002:a63:874a:0:b0:422:8585:2e3f with SMTP id i71-20020a63874a000000b0042285852e3fmr12924594pge.567.1660598684086; Mon, 15 Aug 2022 14:24:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660598684; cv=none; d=google.com; s=arc-20160816; b=jvoEs6QQkpKD7zKvyTS+ClbFJu7w6NZiHIry/dgHbUpWqLlZv34luD06agaPLNM2jR hXlVdEIO2mEOVUDLtnjVHXoQn3/wlB8TbFfWPCsPYRK9GHtmfC0JaD2AUyIJOU7ClStO 435VGD0uvJogKo9UFt0yF9Ik2lhtrXVEUk2/CCW1/sNAlSGb7GfxbSYnZhCgskhHV4Ro m4WzQBz1qmgVXqNJCycgyPcbWeWY/qg4888fYn/wlGyPUni3exHe7KTrYP+MIKZCCKpq yLxGKzcXWatkdI/UwVYg4Fmg9MLeV3nTuBvRDdgPRDfgrEGBT8gxlob5HWhc3PlC/aop TxOA== 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=Y7tksR0Kxs1RhNyQMCFePZFXWAjjczdiwcMg+/g3xq4=; b=1J7HwyZVUqqFrlHA2xkQCE1E+lN0mKIr1d4GTJ9J810zUB3Z6CfgPXZ1g75VQbTfV9 RPhGx3ZhKVzbdZ5+B33r54IdZQ2a3tY7LC9OqGjJTxW8siGVoTrZZkBi3usu96DaqAqe odS6Hx2dLK5GakhRswnD+OTOrc46lwNl4WhswZffQomsf8Sz5PBW7IftuQBKc5mMkbVN 3ju38aldw2vu1t2kCGNwUu4mUidGW2CQgGKqZWkJhBWZl/ZlHZuhufdoQGxG+y4meEXA EGp8omhXH7rNlkvNk9obUuC7NtWsGlSf+Ryg1qQwr/E6t0h1ptt2Q/QU+rEl+r8nVRf0 HHXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=BV9ZSZ6y; 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=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i6-20020a635406000000b0041bd09a9c1dsi11585045pgb.536.2022.08.15.14.24.28; Mon, 15 Aug 2022 14:24:44 -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=@linuxfoundation.org header.s=korg header.b=BV9ZSZ6y; 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=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241239AbiHOVWO (ORCPT + 99 others); Mon, 15 Aug 2022 17:22:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59994 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245528AbiHOVQ6 (ORCPT ); Mon, 15 Aug 2022 17:16:58 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 70730F3B; Mon, 15 Aug 2022 12:20:19 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3B1DA60BB7; Mon, 15 Aug 2022 19:20:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 357A9C433D6; Mon, 15 Aug 2022 19:20:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660591217; bh=koEmmcXb9FfrHcn5esncw0TNEGulqIwaVYmOpG1i0Uk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BV9ZSZ6y7NkALF1uzg/u42WFx8pQ7wA1eUDbv7TtgPqodvWFIsRy7at3fue8sXniy SldHjSjhOvUZIMcXw18Xy3HNnE4eAeGr1jBNfIbwt+Z/fHuM+99JGmyUUgukIlNBj3 0ZN6WNQGd8DT/FP8LCKWSK6vhv3yswdvh/KySCZE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Carpenter , Alex Deucher , Sasha Levin Subject: [PATCH 5.18 0510/1095] drm/amd/display: fix signedness bug in execute_synaptics_rc_command() Date: Mon, 15 Aug 2022 19:58:29 +0200 Message-Id: <20220815180450.629402741@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180429.240518113@linuxfoundation.org> References: <20220815180429.240518113@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 From: Dan Carpenter [ Upstream commit 06ac561fb0edf868f7b292fb4a3c8ffbbb1e14bb ] The "ret" variable needs to be signed for the error handling to work. Fixes: 2ca97adccdc9 ("drm/amd/display: Add Synaptics Fifo Reset Workaround") Signed-off-by: Dan Carpenter Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c index f5f39984702f..a3282ddbff86 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c @@ -571,7 +571,7 @@ static bool execute_synaptics_rc_command(struct drm_dp_aux *aux, unsigned char rc_cmd = 0; unsigned char rc_result = 0xFF; unsigned char i = 0; - uint8_t ret = 0; + int ret; if (is_write_cmd) { // write rc data -- 2.35.1