Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp2900902pxb; Tue, 24 Aug 2021 10:11:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwdRJYJ1bmMeItE4npe3GwDU892dOeBSaFQ7zfHlYCu5oXPy9eUBHavajXxbVTUuJ2ull9z X-Received: by 2002:a17:906:c087:: with SMTP id f7mr40851568ejz.487.1629825089411; Tue, 24 Aug 2021 10:11:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629825089; cv=none; d=google.com; s=arc-20160816; b=cylceCOp7z0OWS3jX2fP7XM3SDyypIbmKQXcGubEKn5bwkqTB6BW3pyGIqL4iJjO/C P9yHnYc4G/aVnfu2FUAWCk8N3Zb34WHAb6WlpujkoJ4Sm3goyqqfeD3eYWpqyEXcWNIt 6ONfR2ftx9XCmM0C5CrxPagtSYw1MYESINSQ3yjVp5FkJa/D5pTTM/TgboZFIZpn8kBG 6FnA5tG7WPQDC4v80lEgqi7jEBZboxc7A7jbnKSoqU/A1VHGoPeJVibHkKb/qbTBweig uqTAF41WaI34C/Sc2ANk0UqLpZWxP6WrVHsptSfWU8A5hhcUM05Agx2qXAu0PheaIKV5 6HRw== 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=CXT4AAEPCliI0heaUaWFHGm0wnof6YBRVSsdIFs5MRo=; b=IdKGrdE/VzpY7qiTZM6IPNe8kMoslIk+jMMho8yF0IyC9RVCsgldqHIVA1S2F09gVv gVlCpLDkHLxxx8CMFgyhLy35Dj9QmSUkAWE2ivx6SDPl9UooP/uakhy/4g5RJV9dzTKl lLkkLajVjQ0bTF7Srr5iWGaYW82SIwLcnzxqNLxKkPURcR5W64uONzvRnR1zXFmwqPdn IkYeLLGOY7J5pIJXfoZm7CU4U5a2Xb6OuuqiR1SY5VCY6wO96RsmaZ51CyhaaP3r/Ctr 3qq/LRFxPVULCniuiuF7s290q557rHo/te5rSQjDHzK2fLR6hZt9E0lB6RYABdV2tqMs A6aA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ivtwmZ7X; 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 lv23si331505ejb.287.2021.08.24.10.11.04; Tue, 24 Aug 2021 10:11:29 -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=ivtwmZ7X; 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 S239450AbhHXRJO (ORCPT + 99 others); Tue, 24 Aug 2021 13:09:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:46256 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239367AbhHXRGz (ORCPT ); Tue, 24 Aug 2021 13:06:55 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3A1BC619EE; Tue, 24 Aug 2021 16:59:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1629824392; bh=3AlQTigumnT1uHdisyjRTr/f2fpblGxAwchy2ZdM4Hg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ivtwmZ7XRXsCznqvXIv/3V2daS5C2aqGsAW8VL9j4YKNhqQHKaEKRFF+Q/rHj66B8 MgdfrOhe0DC3I/Xml4n+FeqwC8qfBaI2SzBS90GxHT17YvhOZL/Ld55GLY6vKPwXlt mf/O9uOVUN6DhuIX8XjoDOMs9StxJ/bdqjBV8avo3Y3HOiXgTmWw1eHJnm/LjoJoL1 JeDsFM2eqHA7Ot85/GOg1NUtDraPN44Lcmhv2USobzTdv09t3SAfyQe0u6SQgVVEmy yAuVbKP2xKDMPJVBOxn3eiyK33ld18f7HY9GR3J09CLNT2sTuCfh8bUliolJtbswRr pRf5E1uwHCmvw== 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.10 42/98] bus: ti-sysc: Fix error handling for sysc_check_active_timer() Date: Tue, 24 Aug 2021 12:58:12 -0400 Message-Id: <20210824165908.709932-43-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210824165908.709932-1-sashal@kernel.org> References: <20210824165908.709932-1-sashal@kernel.org> MIME-Version: 1.0 X-KernelTest-Patch: http://kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.10.61-rc1.gz X-KernelTest-Tree: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git X-KernelTest-Branch: linux-5.10.y X-KernelTest-Patches: git://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git X-KernelTest-Version: 5.10.61-rc1 X-KernelTest-Deadline: 2021-08-26T16:58+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 c3d8d44f28d7..159b57c6dc4d 100644 --- a/drivers/bus/ti-sysc.c +++ b/drivers/bus/ti-sysc.c @@ -3061,8 +3061,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