From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 6436232861F; Wed, 20 May 2026 18:00:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779300022; cv=none; b=uSXt35KcDyPeOBw1pOKC426T4rIEcshNLji1sziUnuPNqvaBecNjiClLsTZY6dn2O077c+6T+EtiG0b2MLXoYitDjEVD1+U7TCAwskBGTsL/qEcQ22JjAcxUlYo/yJWy4ZnP72gQ9LtlDSmpdaziAu1blkvDQtnhjC9DBnOVAFM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779300022; c=relaxed/simple; bh=YI46Iuy8r9q2mFIif6uDvjFkSHFtxc/pdpf1MybC2nk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=FX0u0gB1D2JEYQtE9gdJxks3hld3OAFexzM5aX5BmI+3Wm8ckwgPjRslwWZw4Uu/hdfXKPdh6LRgDoyWSQFS0kZfd7TYLLq9EqV8SML6c7VZpVzCkVG0Z7qSgSuDRmthSgIx4xCAgXoDp05vsXzY1hHKLtgZKrc4fXruruQ55+Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=KzKhY8+8; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="KzKhY8+8" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A3C971F000E9; Wed, 20 May 2026 18:00:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1779300021; bh=7i5KKuqvh5v4WhezRTEMTdvXuQXC4OUcfioN4EEjXyY=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=KzKhY8+8pJu7Q2OqLPTr6G0XGaI02fQVt6g27ZHiCTprfFTLR2sW4XuNL9pyboC8R Y3DueikCdjmECZGHquk4l0L1pNIqX7yR6RcuCvRmdORaNCKnAbru0186bCC+sa2LzN VY2nwyLVSBJ8IUeHf8nTn51XALVjnfY4tWhw6Iwc= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Gopi Krishna Menon , Daniel Lezcano , Daniel Baluta , Lukasz Luba , Sasha Levin Subject: [PATCH 6.12 018/666] thermal/drivers/spear: Fix error condition for reading st,thermal-flags Date: Wed, 20 May 2026 18:13:49 +0200 Message-ID: <20260520162111.624220173@linuxfoundation.org> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260520162111.222830634@linuxfoundation.org> References: <20260520162111.222830634@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Gopi Krishna Menon [ Upstream commit da2c4f332a0504d9c284e7626a561d343c8d6f57 ] of_property_read_u32 returns 0 on success. The current check returns -EINVAL if the property is read successfully. Fix the check by removing ! from of_property_read_u32 Fixes: b9c7aff481f1 ("drivers/thermal/spear_thermal.c: add Device Tree probing capability") Signed-off-by: Gopi Krishna Menon Signed-off-by: Daniel Lezcano Suggested-by: Daniel Baluta Reviewed-by: Lukasz Luba Link: https://patch.msgid.link/20260327090526.59330-1-krishnagopi487@gmail.com Signed-off-by: Sasha Levin --- drivers/thermal/spear_thermal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/thermal/spear_thermal.c b/drivers/thermal/spear_thermal.c index 60a871998b07e..19b37f9b093f9 100644 --- a/drivers/thermal/spear_thermal.c +++ b/drivers/thermal/spear_thermal.c @@ -93,7 +93,7 @@ static int spear_thermal_probe(struct platform_device *pdev) struct device_node *np = pdev->dev.of_node; int ret = 0, val; - if (!np || !of_property_read_u32(np, "st,thermal-flags", &val)) { + if (!np || of_property_read_u32(np, "st,thermal-flags", &val)) { dev_err(&pdev->dev, "Failed: DT Pdata not passed\n"); return -EINVAL; } -- 2.53.0