From nobody Wed Feb 11 01:25:45 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 959DFC77B73 for ; Tue, 6 Jun 2023 08:19:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236306AbjFFITC (ORCPT ); Tue, 6 Jun 2023 04:19:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236108AbjFFISr (ORCPT ); Tue, 6 Jun 2023 04:18:47 -0400 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 69F27E4B for ; Tue, 6 Jun 2023 01:18:45 -0700 (PDT) Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-30ae141785bso5717967f8f.3 for ; Tue, 06 Jun 2023 01:18:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1686039524; x=1688631524; h=content-disposition:mime-version:message-id:subject:cc:to:date:from :from:to:cc:subject:date:message-id:reply-to; bh=r1ogFYOCyCFggyVGMppR34+8UlfrkJd0gNAyYus2c7g=; b=GaG1+A/1fqB4K0sbQ53AXMdJkSekcvvdxU93FR0Sl4ZGcV9BC4YC12z984o5xqeIg5 wph71hndT/zbGpnrzvhxtJF+EGGdYGwnJ2xPdlRWVAs/rYBKj+97rqjEhYmGkQO9MKJk seJY5gu0yPutMel+ZkqF+QmP4JdVFKcwrLdRkn+CipWJpfwAP9siotUlyUwgSJaXnZoA x6ut+oNptwIz5G6D77TRLkYrrly8eFrnTyzTrdGVTD3u3XfH9U5lwRCzDzvbXcGxkk5P 5KqHgpiSgdUJPCRWP5NaGPOO134PrNqn//fEebmipori8S8WYYue8qHd2zUpbw3i4Oa+ vzhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686039524; x=1688631524; h=content-disposition:mime-version:message-id:subject:cc:to:date:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=r1ogFYOCyCFggyVGMppR34+8UlfrkJd0gNAyYus2c7g=; b=kbkIQBAsiSvWkWOvUnT9s8bpHgaLl66dEZBEwNs3poBNjU8gLtbspm/OdN21Bqi1HE zHJuPTQN6rbz30Gf29Csx2WW5N2b769XGc33o+ePv0SKIveICdqvI+Fm1NTx3RgpFs9p 2tbYE/e/EFerxTRlxRkJsx825py9KfFWi6jefdCXGf/ipGYP9N/3HO0GYJlpLLWqBsSB 4ubLrEa6YlM3t8nZAr/bYq21HpMzjm2sIHzS/2XrEBTGQC2ngeVjeA4PD5YoWiHe4LB+ JqIuL0YkP3ahlj2behRxTqgdJauXLLqfRqUzbMRZhOhGHR1UWWXS4CPZehuMKEkLKVd/ lF3g== X-Gm-Message-State: AC+VfDzT0VLnVedze0AQaY1iPSbUWorGxGRTUoHrnECHDdmI9ycROoRP eZKtPz0CpLN/ne0sEQIBsNWRBg== X-Google-Smtp-Source: ACHHUZ4co9T62EMNnO0BuoPuXsJlGg091sebkcpWwQ08ejOZgq+8Q/rhKN06jYlX3r6Sqsuq8KBhaA== X-Received: by 2002:a5d:40cd:0:b0:30a:eac4:26a0 with SMTP id b13-20020a5d40cd000000b0030aeac426a0mr1150739wrq.18.1686039524012; Tue, 06 Jun 2023 01:18:44 -0700 (PDT) Received: from localhost ([102.36.222.112]) by smtp.gmail.com with ESMTPSA id m25-20020a7bca59000000b003f7e62d38d4sm4263267wml.25.2023.06.06.01.18.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jun 2023 01:18:42 -0700 (PDT) From: Dan Carpenter X-Google-Original-From: Dan Carpenter Date: Tue, 6 Jun 2023 11:15:46 +0300 To: Michal Simek Cc: Daniel Lezcano , Thomas Gleixner , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH] clocksource/drivers/timer-cadence-ttc: fix a signedness bug in probe() Message-ID: MIME-Version: 1.0 Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Make the "irq" variable signed so the error handling can work. Fixes: e932900a3279 ("arm: zynq: Use standard timer binding") Signed-off-by: Dan Carpenter --- From static analysis. Untested. Presumably if probe fails the system is unbootable so I didn't bother looking at the resource leaks. drivers/clocksource/timer-cadence-ttc.c:377 ttc_setup_clocksource() warn: '= clk' from clk_prepare_enable() not released on lines: 370. drivers/clocksource/timer-cadence-ttc.c:466 ttc_setup_clockevent() warn: 'c= lk' from clk_prepare_enable() not released on lines: 466. drivers/clocksource/timer-cadence-ttc.c:529 ttc_timer_probe() warn: 'irq' f= rom irq_of_parse_and_map() not released on lines: 508,516,521,525. drivers/clocksource/timer-cadence-ttc.c:529 ttc_timer_probe() warn: 'timer_= baseaddr' from of_iomap() not released on lines: 498,508,516,521,525. --- drivers/clocksource/timer-cadence-ttc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clocksource/timer-cadence-ttc.c b/drivers/clocksource/= timer-cadence-ttc.c index 4efd0cf3b602d..8ba1f5c2d7992 100644 --- a/drivers/clocksource/timer-cadence-ttc.c +++ b/drivers/clocksource/timer-cadence-ttc.c @@ -468,13 +468,13 @@ static int __init ttc_setup_clockevent(struct clk *cl= k, =20 static int __init ttc_timer_probe(struct platform_device *pdev) { - unsigned int irq; void __iomem *timer_baseaddr; struct clk *clk_cs, *clk_ce; static int initialized; int clksel, ret; u32 timer_width =3D 16; struct device_node *timer =3D pdev->dev.of_node; + int irq; =20 if (initialized) return 0; --=20 2.30.2