Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2371675lqp; Sun, 24 Mar 2024 16:18:48 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUqB3W5CY7v9gNb5Hd5ffeFiGQtY/cA6daN75cz/PlZp3APksWWv9JiZTvn7yIMon9SVf/yIwCoHc9k9ZXE1xSSl90uHRXsg5m8Rn4LiQ== X-Google-Smtp-Source: AGHT+IEqbGOoUg9FPAMf5N9jAlvcb0jJekO76m46yGdxgio3PJPCQPdmScBzNwbCemj7Uu99pKS+ X-Received: by 2002:a05:620a:3b86:b0:78a:42c7:ef3c with SMTP id ye6-20020a05620a3b8600b0078a42c7ef3cmr8199012qkn.1.1711322327710; Sun, 24 Mar 2024 16:18:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711322327; cv=pass; d=google.com; s=arc-20160816; b=L5ymYJYy9KkhvCEqfpaYeolS+T/UxsVMyao3bTGGnjFu+mgmXuY+rTQ6tEb1WASiZl qldrHjUfdVFHQ0AmtxHIdMFY2bkSl3mVGHOXHd1bcEMPcUJEUJRLE1FlmxcoirvbrA2M hYH+elf18U1LhWIp5gHqPVLBpOEvEnVPfrf1rYr8BSuGQ6O8wThL+CBy7OOKcYLB0nLT Be7xo4M2Vq0yybpw5a+CANIhr6KhVL57gW2geWFH1qmnBVu4eBCQNXh5LwhBN20YMqHp 3k2OCh8zY/27Y0WuHHUplw/zcxH6xlfArO6HDPMr0rOmFCs2yWFm0XSkhEll14Gs+umr 0Vzw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=BVRF76AuVKf2DCUn9j7taCkXPHHguqi1hsM0+6TE6Q0=; fh=NynhIRTmxN0RCcEeTc1nU7oLx3kOkYaX5Dx99gNlN2I=; b=oxVQYl6o2keHyZY7w/qg5UjQiO170N38oWxJBd6BADIcNnzjEK1eROsWvAr01LRMKi OA0JLqlB8X6xZGE1k5W5rtF2LIa4ANGbybpKebZBP03zMcselNGYuUEdfJhjRTT3Z4C4 s588PijCNW/yvFn6wrQTC4InbkzQD+bdAk5mIbUfjBBhralUNt3rmRt12WwvqQYPr8t6 b1mjG2DruZUaTJN/OMQO7BGdIQy/7mrYH36T1cNCdIoNNyvsSh/xv3LYBDWJBDW5dPB5 G9mRevwkJsZIUxPzgxixeo/MwDtxRY4W6aQ4TtFTUwUjtU7zWV/AaonfyaEFvFFnZnAp qYQw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ncNvJONy; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113085-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113085-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id y23-20020a05620a09d700b00789f3042d77si4271363qky.401.2024.03.24.16.18.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Mar 2024 16:18:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-113085-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ncNvJONy; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113085-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113085-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 4DBCF1C21770 for ; Sun, 24 Mar 2024 23:18:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8A70114E2D4; Sun, 24 Mar 2024 22:38:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ncNvJONy" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 982B914E2CB; Sun, 24 Mar 2024 22:38:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711319893; cv=none; b=iVC3nD5ZPxjIxRBxZcZ0mShpSH1fka0Iohji+/ZZatUz3sLvYi2Ft4W7x/QCg3q/CsUOEHc7oKl+wKB5kJaF2Iy5K19fNWPqobYdWGE50olhRbX6G0lvbTsXnsR9QwdHTNL6JHIuOTWdQge7jpLUJq6UjZsvvWYDhzW7eam6ORo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711319893; c=relaxed/simple; bh=XTfxCywVWqK8pg6d8yIzBn4qNjzARm/lWyecsJM7WN4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=sRroTQC1kZd1ZsQCBusinUgqyl8a9qDwukUA+43e9VIo+qUXtapZe6TSmKHs0E/5Hz7T496EZ51BWTvdJLpAW+Xlx/+KK4WhCQ3csga9Bq8YNbnh64TdGffPa8fjLEzvZVD6uvtgU3MtKNvzz6pwwBHl5kf4J5tQVPYHifGeHJY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ncNvJONy; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id A945DC433F1; Sun, 24 Mar 2024 22:38:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711319893; bh=XTfxCywVWqK8pg6d8yIzBn4qNjzARm/lWyecsJM7WN4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ncNvJONyaP6kt2ROV4iOu1+JJLgeB0n0EnZB3etS8QTS5bE9AmSuNtsY9fDriIvht 61JSNojzt81Zd+dB/mJGJ2H9eQFknRoZDZuhBhGu3uswNGyBWVYUdPmMaK7TU7MdMW TCVzVMo9AlbJKZsegHpf1IVTSFfPUZdXwE7HikSh1c/GHYwtlAbo4ptGYo00ugJdRT Sj23j6Ajx/S765tGNNH/JHckZK3Pweb0lgcTX9Lp7qNld/iALARc62yuyP8dMuiEst ncx4jfQqlM2SD38Qk6Pd9qw97BLbj+atO9uGm4ijEuR9tIDOo4Vm/+zPD9EZePgzuy B+4LuuFO4cNLA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Unnathi Chalicheemala , Elliot Berman , Mukesh Ojha , Bjorn Andersson , Sasha Levin Subject: [PATCH 6.8 198/715] soc: qcom: llcc: Check return value on Broadcast_OR reg read Date: Sun, 24 Mar 2024 18:26:17 -0400 Message-ID: <20240324223455.1342824-199-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324223455.1342824-1-sashal@kernel.org> References: <20240324223455.1342824-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Unnathi Chalicheemala [ Upstream commit ceeaddc19a90039861564d8e1078b778a8f95101 ] Commit c72ca343f911 ("soc: qcom: llcc: Add v4.1 HW version support") introduced a new 4.1 if statement in llcc_update_act_ctrl() without considering that ret might be overwritten. So, add return value check after Broadcast_OR register read in llcc_update_act_ctrl(). Fixes: c72ca343f911 ("soc: qcom: llcc: Add v4.1 HW version support") Signed-off-by: Unnathi Chalicheemala Reviewed-by: Elliot Berman Reviewed-by: Mukesh Ojha Link: https://lore.kernel.org/r/20240212183515.433873-1-quic_uchalich@quicinc.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin --- drivers/soc/qcom/llcc-qcom.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/soc/qcom/llcc-qcom.c b/drivers/soc/qcom/llcc-qcom.c index 4ca88eaebf06a..cbef0dea1d5d7 100644 --- a/drivers/soc/qcom/llcc-qcom.c +++ b/drivers/soc/qcom/llcc-qcom.c @@ -859,6 +859,8 @@ static int llcc_update_act_ctrl(u32 sid, ret = regmap_read_poll_timeout(drv_data->bcast_regmap, status_reg, slice_status, !(slice_status & status), 0, LLCC_STATUS_READ_DELAY); + if (ret) + return ret; if (drv_data->version >= LLCC_VERSION_4_1_0_0) ret = regmap_write(drv_data->bcast_regmap, act_clear_reg, -- 2.43.0