Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2613081pxb; Sun, 17 Oct 2021 20:30:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxKGYAwFVkz1HiuG+1nguEdP1PqfsSJDG1ja0nVDNx9pX4bGJzmpGC4APimQIBSdSJhIwNg X-Received: by 2002:a63:ab02:: with SMTP id p2mr19308050pgf.258.1634527852369; Sun, 17 Oct 2021 20:30:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634527852; cv=none; d=google.com; s=arc-20160816; b=q5hTTo/YEYnKRG6zqtuUSkBBWMJXY1Af/qskQijUZWBHg1zy2BVhTcuwq0sOv8weAe C6OwBgc/9hnbHio2+kWHCR9McpmkNVnT5IsruPp1GUzBVKS1YXHaURJeXVWdvUqgGut8 tzWPct6hn6SMT+Aln18sq+ZaAiXovbFtdj62EjEZJiDFC0CBqoGzJ/BixBEX7Jm2uy6Y Lh1ovZnUbLT80yLkeOfutIj+YCVXC6AsDzTI253x0n16nDtyz6YuuRtjplcEK3rBgdeM hWyskPwXR3dgdOMs/OS+NXl1lUCr5CBkIa/RBnumD6+zJDaTb+U9mwZdc9wTpLqeUyIG pjdw== 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 :message-id:date:subject:cc:to:from; bh=TXwXDbgLNgHXqTgqLo23F4TwfdSsFvkHNd7OMXYsGVc=; b=sg8T0xAcaBbiydOyP1izX7xjl5YSt9o6asfQyznuQNLZthuKT0y6S7nzOI4yHRupRO JSab1LQg54/mDOS/Aq4xOGNDRaHV9cmwQQIpIiAsePS2iRBM98nZtgx3XGars883rAP+ o53vPdyD1B04rip/qruQ+G9sjB8ayCCWTPW8TsuNFzi1Bdsd3l2KLf6huzhmlp7DqA8c 2lN5p7ZELoTDqG0orvuLvHlkI+I5w9U+8PLZz/f9Is0EadlGfPM/MHQ9oZDS1OMXcuAI ZcDX5yPZL1wTH2nJn9CK9Ce4Dpq/COjJTeJGJQt4NP0dm9RY4DHUSPBZTCa13EW27wbt D89w== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a24si18118802plm.211.2021.10.17.20.30.40; Sun, 17 Oct 2021 20:30:52 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239873AbhJPImo (ORCPT + 98 others); Sat, 16 Oct 2021 04:42:44 -0400 Received: from smtp02.smtpout.orange.fr ([80.12.242.124]:52329 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234494AbhJPImn (ORCPT ); Sat, 16 Oct 2021 04:42:43 -0400 Received: from pop-os.home ([92.140.161.106]) by smtp.orange.fr with ESMTPA id bfF0max1HqYovbfF1mCK1f; Sat, 16 Oct 2021 10:40:33 +0200 X-ME-Helo: pop-os.home X-ME-Auth: YWZlNiIxYWMyZDliZWIzOTcwYTEyYzlhMmU3ZiQ1M2U2MzfzZDfyZTMxZTBkMTYyNDBjNDJlZmQ3ZQ== X-ME-Date: Sat, 16 Oct 2021 10:40:33 +0200 X-ME-IP: 92.140.161.106 From: Christophe JAILLET To: maintainers@bluecherrydvr.com, anton@corp.bluecherry.net, andrey.utkin@corp.bluecherry.net, mchehab@kernel.org Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH] media: tw5864: Simplify 'tw5864_finidev()' Date: Sat, 16 Oct 2021 10:40:29 +0200 Message-Id: <189d4fd72db8707cb495e3a29ab7a276e07f62a0.1634373552.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Some resources are allocated with 'pci_request_regions()', so use 'pci_release_regions()' to free them, instead of a verbose 'release_mem_region()'. There is no point in calling 'devm_kfree()'. The corresponding resource is managed, so it will be fried automatically. Signed-off-by: Christophe JAILLET --- drivers/media/pci/tw5864/tw5864-core.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/media/pci/tw5864/tw5864-core.c b/drivers/media/pci/tw5864/tw5864-core.c index 23d3cae54a5d..fee3b7711901 100644 --- a/drivers/media/pci/tw5864/tw5864-core.c +++ b/drivers/media/pci/tw5864/tw5864-core.c @@ -333,11 +333,9 @@ static void tw5864_finidev(struct pci_dev *pci_dev) /* release resources */ iounmap(dev->mmio); - release_mem_region(pci_resource_start(pci_dev, 0), - pci_resource_len(pci_dev, 0)); + pci_release_regions(pci_dev); v4l2_device_unregister(&dev->v4l2_dev); - devm_kfree(&pci_dev->dev, dev); } static struct pci_driver tw5864_pci_driver = { -- 2.30.2