Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp353279lqd; Wed, 24 Apr 2024 04:40:29 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUl2YGaRVwm7oRi90NxsI2KL7hJ1kvJvv4utszavS0LGqPwKZz5ORbNdmNn1EUbc7OVeD94A3AjRCJTUOi19nCmcy+2WPAkwzD1h1IzzA== X-Google-Smtp-Source: AGHT+IFDZSh5pEBTgP71l7HwiCNWHDvyfusgmlvHlwmYnMdehjg/6yg4xJzWqEN1sGXvbUbRXby8 X-Received: by 2002:a19:c20e:0:b0:51b:59d4:dead with SMTP id l14-20020a19c20e000000b0051b59d4deadmr1552407lfc.39.1713958828977; Wed, 24 Apr 2024 04:40:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713958828; cv=pass; d=google.com; s=arc-20160816; b=sZDhIQaSsNaxaYmoO4zxZCAI4OHB1dyo6bUmXtfBBcPwLebRpqD3w4hyXWknW1vXb0 4Kk5gWeRn4VPEKk8TTbItJdOQB8IANknMFrVvaTuOV+c13kDQifPcooPMJeCrOEkhMlU tw0TxlYF+LQ6qaAv9PDt55nqYTDdfmpxpHm2uy3fw2ujEGlee6OaFIRQULJnU9iCoOsI WccDS6ZAbMJtHgA38Z9IcdKvUcsRifYo/nYyGDMf9Is0U6yecJDUibx13QTmUjNXPXlh NJZ3upnCa14gPMe2i5OxYuZmAKrZ1cgFBiLbbaM+yRBoUqoKEjWOUabe5SpJ8++eVAzj AN6A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-disposition:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:message-id:subject:cc:to:from:date :dkim-signature; bh=lWMfbfXnYK3fqv0yrgeedC9giNqOZfecY/EM1i6Y9pw=; fh=huQSwk6W0bnFTyijo5GE3Z3wMj/pjIaqQJkonYW/Ox0=; b=iUOjXaJN96qxgFuQLrRr/bIdDZuNO11v0k42eaWzmMVblDNLv5xDa8ZNnOAkRqAY0O 3BlS7KB7lTIAzofE4YK1t1yIbfafQV6qR9zwdxOgTHV/gwUwkLQsu0zLVGUox0ezT4wp fbxNIG2vE9s4A/vkmOrZj4v3aC9gufYuGgj8sEWJIQ6EnKPH7o7+AI3HqwKeKPFS7U0R 3xJNfkxDgyg8MtQQyDs83kR3+g2/oArCstGQEPKozmP+eeDKyZkWrmb67SeKZL9Prooj GMSCKt/9Wf4epht3Zs6rMtHJEL+fuWSaIV1Km4DuLR7tZEnonzkmPQVMuw3KvDmhdZYD /gbg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=edKYD9Dn; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-156807-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-156807-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id i12-20020a1709061ccc00b00a55b576c863si3969098ejh.161.2024.04.24.04.40.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Apr 2024 04:40:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-156807-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=edKYD9Dn; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-156807-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-156807-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.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 am.mirrors.kernel.org (Postfix) with ESMTPS id AEE6F1F24313 for ; Wed, 24 Apr 2024 11:40:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2B32915AAA3; Wed, 24 Apr 2024 11:40:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="edKYD9Dn" Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 76DA615A4A0 for ; Wed, 24 Apr 2024 11:40:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713958821; cv=none; b=k3D19rUrll6J/C61/p5MuPcR/Slaa6LJchGtLUWXbmOnk7hvsTloIlkY8JI9w6LBCpJActbcQbKwsW3FTX98P46UYRE9lZuzFbWVy8lu54i8YsO+Tqdv/05QmJbiVHh9lZJhPjOSUhpPOMTUOLOQkxITl0eYo45ZbqDSoWNhjAo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713958821; c=relaxed/simple; bh=uPxQKTFjx1OojfL3XIvuRwqZqEHhetjhGQ/QNoCE0cs=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=exOvcDr0Qc8lbxrcPEaLc96XJRmi/MWLXfIRL4xEQR0hl5NfAjOikn2oe2ddN/JB0Gcb51LyV6ZeZQJZGq6NZVyUhMe0uRrcCn7kFsE9RU+Oqadq4Ig0OX3Z8M8I1BSfRohTdjqclL1W3EYNyQPJcrMYFzRNdYOYqi8DZ9DP/7M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=edKYD9Dn; arc=none smtp.client-ip=209.85.128.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-41a1d88723bso26653435e9.0 for ; Wed, 24 Apr 2024 04:40:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713958817; x=1714563617; darn=vger.kernel.org; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=lWMfbfXnYK3fqv0yrgeedC9giNqOZfecY/EM1i6Y9pw=; b=edKYD9Dn7FaCWOBjpHdZh4kLOcScK13PKLKG9a8zuh+rux5j/0bEp7lbhlhu+P27pk SujBXnQa7jgAn4MzXbVLXsYf0nkEzHgn7hbwkuDpFnxLmwq2lD47B6/yxtRTBIJD/sK0 NDCPjDHmye2Cfg8oVuOs6YYRu1h6sfuxvdTr1ruM6+8jFNjFCCAFWqt3Ss4iD4yTfCy6 SwouGHq5Ym4i9/2O0zDcQpq/bR5GrWghp/es4enWAe8Quj6XtEUah889VLl7GJ7TjIMg d4SZbm0PK6cRsdRlR38QXJLdvgFJ+TMIloQ0+QYICRDoVGjn5DDHSOovoSZ27sXe3tYa EhTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713958817; x=1714563617; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=lWMfbfXnYK3fqv0yrgeedC9giNqOZfecY/EM1i6Y9pw=; b=TjeqDvzbWbExedRoDwYewaH6My+x4TC1FMG8oHmErdAZ/UQBiI0N/UkQtR4XlomF0w Ib9ptdFfo4UC4A74ubmds6KSHWGK3RzUw2x3WodYqOp8IkqMCgaVu1gCD4c+ykQTgYvM 9g0K/JhAFXTJvrZ9x663lmDU5i9UvAOMrmuly0aK2nrZoBFa/TGkNJX4cs3Rcm5cBmLI 0MUgeMmLl6jUquE0sXxQd9krhLNgTvnJ+yWU8pTDp1241d5pt65pQEgjn42J+TB5QG01 JSjGkYifCHLxrJpp/T+8iUvJXM8JzxOR2UviSfI0m2JBdOdzL/89ip2eA+mJ6hi9KdVI Er1Q== X-Forwarded-Encrypted: i=1; AJvYcCVtCzxHd9RgGXrtm7BYyV9sHoxcRPMNWS299hhwoc8n7HPbfib/IGu4aQX2oxZLKEY8IEDWxEkL6rmLWQl0NFFGnXAxUlJSoxBGMOBm X-Gm-Message-State: AOJu0YzUDWns+2+H0+OXaEVje5S2ydX/4Du5msONXRCAyNOJGOwT22Fy 1RbXLGrBDfi8lMFOc87uKp2BVNJgrgQndnBbaiw4F6dYslhDiQqNUiEbpXJ6qdY= X-Received: by 2002:a5d:568d:0:b0:34a:9b75:cb95 with SMTP id f13-20020a5d568d000000b0034a9b75cb95mr1449964wrv.37.1713958816645; Wed, 24 Apr 2024 04:40:16 -0700 (PDT) Received: from localhost ([102.222.70.76]) by smtp.gmail.com with ESMTPSA id d4-20020adfe2c4000000b0034a3a0a753asm15306805wrj.100.2024.04.24.04.40.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Apr 2024 04:40:16 -0700 (PDT) Date: Wed, 24 Apr 2024 14:40:11 +0300 From: Dan Carpenter To: Andre Przywara Cc: Yangtao Li , "Rafael J. Wysocki" , Viresh Kumar , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH] cpufreq: sun50i: fix error returns in dt_has_supported_hw() Message-ID: <9bfe5703-b39b-4d98-9995-f6a7d0ea558d@moroto.mountain> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Mailer: git-send-email haha only kidding The dt_has_supported_hw() function returns type bool. That means these negative error codes are cast to true but the function should return false instead. Fixes: fa5aec9561cf ("cpufreq: sun50i: Add support for opp_supported_hw") Signed-off-by: Dan Carpenter --- drivers/cpufreq/sun50i-cpufreq-nvmem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/cpufreq/sun50i-cpufreq-nvmem.c b/drivers/cpufreq/sun50i-cpufreq-nvmem.c index cd50cea16a87..0b882765cd66 100644 --- a/drivers/cpufreq/sun50i-cpufreq-nvmem.c +++ b/drivers/cpufreq/sun50i-cpufreq-nvmem.c @@ -136,11 +136,11 @@ static bool dt_has_supported_hw(void) cpu_dev = get_cpu_device(0); if (!cpu_dev) - return -ENODEV; + return false; np = dev_pm_opp_of_get_opp_desc_node(cpu_dev); if (!np) - return -ENOENT; + return false; for_each_child_of_node(np, opp) { if (of_find_property(opp, "opp-supported-hw", NULL)) { -- 2.43.0