From patchwork Thu Apr 11 21:17:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 13626561 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 5D7D4C4345F for ; Thu, 11 Apr 2024 21:18:35 +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=0EayIsmAV41Wt5kEdOEFVW3EooZ7UyqHxy6/v7CrqaU=; b=JYxqCi+1dpUwJu 3hAhzpKCwCDiMFnJuOzR39u00A5vW81zvgjWW8ERXC9BVzdei6VO8NYphY8qIA4WUE/qfQigg3TQX Lz+ugx4zrHySXefH/c/2QnaxyVNa0yCyM8oVOv5be/E0+fKrE7C0yqeoOpJhRA+n4gwmUoln+cCjN 2uGQP1v2/zL546Q8zwBxuSBLxB3c7ZDpTcUhOoiBcHabialDcUEYuvs/3zoE121kvoMZK1NPGTbEg qAvZEKC+mm+xlPbfNLVBmlN2N9Aq2DAHDRkgbbBu9YEe9v1p0slMOvJDDSKHlER5AvIEP9+rggIOu INd3v/ucH41yN8suxxsg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rv1oN-0000000E9vU-1vjp; Thu, 11 Apr 2024 21:18:23 +0000 Received: from mail-oi1-x22f.google.com ([2607:f8b0:4864:20::22f]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rv1nz-0000000E9fI-3azx for linux-arm-kernel@lists.infradead.org; Thu, 11 Apr 2024 21:18:02 +0000 Received: by mail-oi1-x22f.google.com with SMTP id 5614622812f47-3c5d5de746cso75908b6e.0 for ; Thu, 11 Apr 2024 14:17:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1712870274; x=1713475074; 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=A4R8SNBXJ275CXC4IwKn1Nf9LGrTrEst208ivldsCOI=; b=fGOt2J+SLTaxtPdOHN6S9RFTnQadFu3hQvhsmdHVEi9xMKPaEzMXZLqX28q1epG3MP r8OWVw9f7aA1EsUKOmVBlnGy0tGzDhcz/5ewkwxTC+7lb9arM+rL8idjP7KGFYVcf6OD Ah3bqg/2f3BSEOrwlBaTPDfVI0Kc1qsJpbflw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712870274; x=1713475074; 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=A4R8SNBXJ275CXC4IwKn1Nf9LGrTrEst208ivldsCOI=; b=HNq9XaH0rO2eNHRIowW/6OksSYYKYQnjgtC4xIVPVG6Sop5UzLvKLMcYnFyjw1RbO3 PdswBiC7xWNHj4wduhiU4Ig6MBRvWU/FFCEb6x2f0ABCDjP955SrI5sl04NPbVZF6K07 C8Mipyiai619s8uTvIhpbVMC1bsIu+ldnABxitjcrBwiRrQ+TPWQXB1jtA8thJ8Mc/Tg ivKm3/G4ZqI2MPuz71d7OTSuUIlM+BaR9mZp70uOZ+bkVzCFjeC4X+UzAjmp5NmZcERt Yg/UP9T2F9/3RewDU+EvkYWaHPv/rGdEvewCaygxUBs0+sXBJflw1Cyj3lWt+f5SufpY syAA== X-Forwarded-Encrypted: i=1; AJvYcCVucBIy146hucUO8t5G8M43BYvEHv5ySc4M5t6p5G49ZsuBoO9hMIDlJiFObcPUKAl+3Zu++bIRDZe2Fbg6oZgl0dlGKyuFIQK/U8x9oHzcYlzjMYU= X-Gm-Message-State: AOJu0Yy1rQy4BuGrB9w+pn4jR7GCS0hUyREM4MyGx5q9wLnnmCF2kKT5 HQsK0xYidMN/ngB5aQWNulh0vy3Ux88D+l/b3dSqa8xnCjIw6G8JRvgSeFrbAw== X-Google-Smtp-Source: AGHT+IEC1vdgwkjJJheMAKozxbMmu/L/tTm4eEGL7yncy97G5OW/5qnYsDss86EcRfqPSpyjplNl8g== X-Received: by 2002:a05:6808:1cf:b0:3c4:f70b:7755 with SMTP id x15-20020a05680801cf00b003c4f70b7755mr793202oic.20.1712870274492; Thu, 11 Apr 2024 14:17:54 -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.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 14:17:54 -0700 (PDT) From: Ricardo Ribalda Date: Thu, 11 Apr 2024 21:17:51 +0000 Subject: [PATCH 2/7] media: solo6x10: Use devm functions MIME-Version: 1.0 Message-Id: <20240411-fix-smatch-v1-2-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_050593_BD5DD466 X-CRM114-Status: GOOD ( 10.96 ) 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 Let devm handle the life cycle of the irq request. Makes smatch happier: drivers/media/pci/solo6x10/solo6x10-core.c:631 solo_pci_probe() warn: 'pdev' from pci_request_regions() not released on lines: 631. Signed-off-by: Ricardo Ribalda --- drivers/media/pci/solo6x10/solo6x10-core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/media/pci/solo6x10/solo6x10-core.c b/drivers/media/pci/solo6x10/solo6x10-core.c index abf30b7609e17..1a9e2bccc4136 100644 --- a/drivers/media/pci/solo6x10/solo6x10-core.c +++ b/drivers/media/pci/solo6x10/solo6x10-core.c @@ -144,7 +144,6 @@ static void free_solo_dev(struct solo_dev *solo_dev) /* Now cleanup the PCI device */ solo_irq_off(solo_dev, ~0); - free_irq(pdev->irq, solo_dev); } pci_disable_device(pdev); @@ -544,8 +543,8 @@ static int solo_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) /* PLL locking time of 1ms */ mdelay(1); - ret = request_irq(pdev->irq, solo_isr, IRQF_SHARED, SOLO6X10_NAME, - solo_dev); + ret = devm_request_irq(&pdev->dev, pdev->irq, solo_isr, IRQF_SHARED, + SOLO6X10_NAME, solo_dev); if (ret) goto fail_probe;