Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp2892396pxb; Tue, 24 Aug 2021 10:01:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/cCk7juW5UcxVySaWD0CIaGUtbTDUKqVSXFS9UpC8Zcv2UhWXZ95DeVajwyCJ+E4L7fE0 X-Received: by 2002:a17:907:98b1:: with SMTP id ju17mr34849354ejc.184.1629824462348; Tue, 24 Aug 2021 10:01:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629824462; cv=none; d=google.com; s=arc-20160816; b=q4UqK2l7i3/hzxMY2Bykit7ii5yH1QFz1nBNLx7dLKOfH26S6eqIuI/hN4RxbpQry0 HCeWFZsXH69xsvsOEZz0ormcv5wH63eHe9DzfiAg7yXxcmOFETZTXwpVsBFNk+isBV5B OyR0k9ddAWBvuftYdZJuT4EiqbHgMyVIkPyY0Kx4qCb0V/2eqYZiQc4N5lMJo0S37t+F VW6OhHwQueJ1IsYXxS5Ao+EZfYmZ5mlQtGcnT4oRbSOCyRtCemh5bV0MewGaLFfwZMUL JTRRWfa4lRANtbGQOGtF4SgJY5X7b0jfPDFWxHNv1zWebpvlgaieSFPybpGBUHEWNp+X 9k2A== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=bhy5IevA5UPumsTaHdHOZGC3oHbUHu4eDVz0zqkLW3M=; b=ARu6rrnocO1BIwtj9oI6CVkrwDMhbR+cG5+Xv1zcrYnQ/n7f4JH4aVg+FsrkjdUT0O pwcD0ncwnLp7vgdBMdndSjU2fzghtymSidjHnsPSyhW4ZCEneT0KGnJ/ArqUzLjR0scx l+EplXLd479+2xS4d8sfWOHNirj+ahLK441p5W3L+AWq8YPzw5evGFWyNRt0BVzGuTjl kU9XnliApKtx/JPkOL2H5/0HtDLqj3zJdcu0MGSzeQ7Dl/qp6sMPIcaDwrzDX+o7+Wcw wYA8OsIKPlhOb6/aLNrUnl4VmOE/LmhHmVF0rph9fMuXTaXWT0C3dQ5v2hPYGX4wa/9Z wTAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="ZimwG/kK"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t2si14082263edd.73.2021.08.24.10.00.37; Tue, 24 Aug 2021 10:01:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="ZimwG/kK"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238839AbhHXQ7G (ORCPT + 99 others); Tue, 24 Aug 2021 12:59:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:39686 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234249AbhHXQ5d (ORCPT ); Tue, 24 Aug 2021 12:57:33 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1A24A61374; Tue, 24 Aug 2021 16:56:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1629824208; bh=WV6j3ItJK6lKMbui71mYR3fC1rSLHge8B9tDITunFbM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZimwG/kKZYA2R+QELudv+5JLt8+mxHRNHdsuwvO0yeT0zUu5ZvfIOareF6GEoaFu7 VxxCGkLj6R7czcy5W3jf1NjeAJ/Zbc4HSJ7jrWnCob0UDXGIBNKHBOaCKt17SvYnv1 0IQeIqkN81jL0lLB6YBjWGKJTKAMyj4kY1FcawGfyZiN/hPGqC/0iMQ1wqL1kwNPda 3x5zAabI23vvuGLAnaFUUHTclM+rDeSHyQIhMPpYgn0a6DiHNv09VxyKa7RoYLeOuT XP1gLFIx5HHkkoRsbYM7WfYAJEe+WnjItVI4dd5a++FObg6V+bQF1xcy2yKppT5n2o FbZm/QjMXwadw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Tony Lindgren , Pavel Machek , Grygorii Strashko , Jarkko Nikula , Sasha Levin Subject: [PATCH 5.13 041/127] bus: ti-sysc: Fix error handling for sysc_check_active_timer() Date: Tue, 24 Aug 2021 12:54:41 -0400 Message-Id: <20210824165607.709387-42-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210824165607.709387-1-sashal@kernel.org> References: <20210824165607.709387-1-sashal@kernel.org> MIME-Version: 1.0 X-KernelTest-Patch: http://kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.13.13-rc1.gz X-KernelTest-Tree: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git X-KernelTest-Branch: linux-5.13.y X-KernelTest-Patches: git://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git X-KernelTest-Version: 5.13.13-rc1 X-KernelTest-Deadline: 2021-08-26T16:55+00:00 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tony Lindgren [ Upstream commit 06a089ef644934372a3062528244fca3417d3430 ] We have changed the return type for sysc_check_active_timer() from -EBUSY to -ENXIO, but the gpt12 system timer fix still checks for -EBUSY. We are also not returning on other errors like we did earlier as noted by Pavel Machek . Commit 3ff340e24c9d ("bus: ti-sysc: Fix gpt12 system timer issue with reserved status") should have been updated for commit 65fb73676112 ("bus: ti-sysc: suppress err msg for timers used as clockevent/source"). Let's fix the issue by checking for -ENXIO and returning on any other errors as suggested by Pavel Machek . Fixes: 3ff340e24c9d ("bus: ti-sysc: Fix gpt12 system timer issue with reserved status") Depends-on: 65fb73676112 ("bus: ti-sysc: suppress err msg for timers used as clockevent/source") Reported-by: Pavel Machek Reviewed-by: Pavel Machek (CIP) Cc: Grygorii Strashko Cc: Jarkko Nikula Signed-off-by: Tony Lindgren Signed-off-by: Sasha Levin --- drivers/bus/ti-sysc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c index 0ef98e3ba341..148a4dd8cb9a 100644 --- a/drivers/bus/ti-sysc.c +++ b/drivers/bus/ti-sysc.c @@ -3097,8 +3097,10 @@ static int sysc_probe(struct platform_device *pdev) return error; error = sysc_check_active_timer(ddata); - if (error == -EBUSY) + if (error == -ENXIO) ddata->reserved = true; + else if (error) + return error; error = sysc_get_clocks(ddata); if (error) -- 2.30.2