From patchwork Thu Apr 11 21:17:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 13626560 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1A659C4345F for ; Thu, 11 Apr 2024 21:18:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=i/F2vCm+Kim+Lwx3arpnapqwVKQLDJS0thymJw2uUDA=; b=qJ6pfukgoTqh5k 3WbtcBR/G5Y0UWaw0QCLes4QbaG0qBZ3M/CikkLyI82zt7o4WYH+a0WyrVXIp/fANoZsg3Nxl672b fbr0lzaXTiNbeMhIY1t6zXPzkCYtBJgF4C9fZOuHRc2V6UbED6fhIyGtOWFTEaI+W9891luQPM9tH n4R3wGZGQxL9ctz6FyFq2ehRrWpZDkjGYKe4b3qjJCLP0iQ4p9g1bCezQfdmCx0daeon0y9nJE0qQ 0vjWkLv1O38B33cOIYHHS5votw69P/uRfIcaq0wxzDvU+dLuARNhYgtNmBuIaIGfuL8h7T2pOIewi zO3oZ/I7d5puTkAO4lkg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rv1oB-0000000E9pQ-1wnO; Thu, 11 Apr 2024 21:18:11 +0000 Received: from mail-oo1-xc32.google.com ([2607:f8b0:4864:20::c32]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rv1nz-0000000E9fx-3bIT for linux-arm-kernel@lists.infradead.org; Thu, 11 Apr 2024 21:18:01 +0000 Received: by mail-oo1-xc32.google.com with SMTP id 006d021491bc7-5aa2551d33dso188704eaf.0 for ; Thu, 11 Apr 2024 14:17:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1712870276; x=1713475076; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=Lp9xnoohaSw2cIC3dXNX7smv9LqAayoL7R0pHvEFgA4=; b=XgB8EcUNZ8JiRqI1CIabWYmOHsayCr/QDs0yIqGRI3Bdk+isIjoE+JlVcoNhX20R6J SHhUFC0rm/Dtb8RufCmvedKUeJcH9+rs0NSEgFwHgyUq9wQE0ZYvZjSFVLjwVObhPAVI PNFWjB0NRbclK/9uthZsKm0g8aefGGo+xzTL8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712870276; x=1713475076; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Lp9xnoohaSw2cIC3dXNX7smv9LqAayoL7R0pHvEFgA4=; b=jsEvMIR31HL3MgSj0tJgCd2ms9y89vs34oXpCwsfP3Pi3CoXGnjDiVv4Kt9ytRSXO3 LvpvjBe3c55sIQQpEWiaFvSgRYGx7fMLwnzMYo8/xMUwriuJygA561+u2CKiyl2dMJUK ASJ/V0WJsY913pPC2rpf36gMfGeeS0+F27USHf8kCF/iWe8CybJd/dN5RC2vLca7Cx86 gl3UgdxG/3ouMAvxxndIyxdJyvam6fS0qqa+VBbWm0K9CO0QB3ITIa46tUa8vtmM+Esb /c1E956aKyl8Qoae85e6Cj0VEOolHa8pzPccTtCKeBGJuxy0dZ6PNJFF68Pd0i6U8Mnx jpvQ== X-Forwarded-Encrypted: i=1; AJvYcCW9HizWQCpuVBlt7TGyGxS+RtJ0m6XkrUN/9dR5r8PNxV8LOREKvGzVSSX1QgGGQ/Mzms/YZGXwQSf9SQ6jCoocoet1FIf1ZuWF2rpQ+fjTlidhpjM= X-Gm-Message-State: AOJu0YxR2eqzATpyobaLjFKEwzSK5zggc8CJUyBaeVuSUzg3ZyOcwd59 DDd1VwuZvHtg0/wB5aKWLqL90XZG3GACta2xTAbxHnlBJh1Hzfmx0r1hB5y8iQ== X-Google-Smtp-Source: AGHT+IH3PJPjNl18QWxefWFNkOVbJgNcIMMPhh3UNIigB6AYGmwgvHF3AHr6NydkhiUfqoz4uLkfNA== X-Received: by 2002:a05:6358:838c:b0:183:7f41:8c10 with SMTP id c12-20020a056358838c00b001837f418c10mr339839rwk.31.1712870275864; Thu, 11 Apr 2024 14:17:55 -0700 (PDT) Received: from denia.c.googlers.com (200.234.86.34.bc.googleusercontent.com. [34.86.234.200]) by smtp.gmail.com with ESMTPSA id k20-20020ac84794000000b00434d7c4f9fasm1373362qtq.8.2024.04.11.14.17.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 14:17:55 -0700 (PDT) From: Ricardo Ribalda Date: Thu, 11 Apr 2024 21:17:52 +0000 Subject: [PATCH 3/7] media: saa7134: Use devm_request_irq MIME-Version: 1.0 Message-Id: <20240411-fix-smatch-v1-3-045f92467937@chromium.org> References: <20240411-fix-smatch-v1-0-045f92467937@chromium.org> In-Reply-To: <20240411-fix-smatch-v1-0-045f92467937@chromium.org> To: Bluecherry Maintainers , Anton Sviridenko , Andrey Utkin , Ismael Luceno , Mauro Carvalho Chehab , Patrice Chotard Cc: Hans Verkuil , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Ricardo Ribalda X-Mailer: b4 0.12.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240411_141800_009318_E929584F X-CRM114-Status: GOOD ( 11.67 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The handled version of request_irq let us remove the free_irq and makes smatch happier: drivers/media/pci/saa7134/saa7134-alsa.c:1186 alsa_card_saa7134_create() warn: 'dev->pci->irq' from request_irq() not released on lines: 1186 Signed-off-by: Ricardo Ribalda --- drivers/media/pci/saa7134/saa7134-alsa.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/media/pci/saa7134/saa7134-alsa.c b/drivers/media/pci/saa7134/saa7134-alsa.c index d3cde05a6ebab..dd2236c5c4a17 100644 --- a/drivers/media/pci/saa7134/saa7134-alsa.c +++ b/drivers/media/pci/saa7134/saa7134-alsa.c @@ -1096,9 +1096,6 @@ static void snd_saa7134_free(struct snd_card * card) if (chip->dev->dmasound.priv_data == NULL) return; - if (chip->irq >= 0) - free_irq(chip->irq, &chip->dev->dmasound); - chip->dev->dmasound.priv_data = NULL; } @@ -1147,10 +1144,8 @@ static int alsa_card_saa7134_create(struct saa7134_dev *dev, int devnum) chip->iobase = pci_resource_start(dev->pci, 0); - err = request_irq(dev->pci->irq, saa7134_alsa_irq, - IRQF_SHARED, dev->name, - (void*) &dev->dmasound); - + err = devm_request_irq(&dev->pci->dev, dev->pci->irq, saa7134_alsa_irq, + IRQF_SHARED, dev->name, &dev->dmasound); if (err < 0) { pr_err("%s: can't get IRQ %d for ALSA\n", dev->name, dev->pci->irq);