Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp2301899lqb; Mon, 27 May 2024 15:16:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX9nV3Buux+O/0/q+ctZaY6AItcyep44vKiCGMsHYQA70+yk4SMuVwjYGzPFUy9kvZFz01WPINwcEDSXpqgYKdbX2Qg+0llyHhrJyg7kg== X-Google-Smtp-Source: AGHT+IGJAsfpVTLHD49+9G+D4Fq6H/PYMd2yaCdW01grRlFwapUiEsEDWthj9U2NXkUGqY+xawzB X-Received: by 2002:a17:903:2cf:b0:1f4:525c:4c12 with SMTP id d9443c01a7336-1f4525c4e21mr123011845ad.43.1716848186430; Mon, 27 May 2024 15:16:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716848186; cv=pass; d=google.com; s=arc-20160816; b=YogSMXdITB6uiGWjuhDttWg9ZKEWNoXZpasC903okmrHRki0kzgfr7Y6y0FpwCNhvR 02EaFSsLI0C+zIL1219fbToCilcThbAr5dvVwxiB/x/iyKBXsJOSiIq0jRYH69y++0mM zGQYrcVj00Gt4S0iT4HxKVBXSy3cU4nto14UA1frqywoiNHn0OQcJwZHFL/A6tWWk0XT LBA0ZTQjg/h2JwVq8dzju9UGLTAwUq+nmy4rIKn1hfrxlfT5S5Ckabmspy5CRnmgCTKT 6CX4fCVAQyNWknci6j9YyKlTOiJ2okFAmGpuvvYBUri3vNKnOm5AGTvvITXFyzLALF1w T/bw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=MH5jBveEGD7wUqQ+hKTo7ViWmJ+iwz9fODsOR0liGjU=; fh=xr2qDPeZTb73PLgyIcENDO6QF+5mkztcXEg9FpWBDUQ=; b=Cj3tV4ofxsewv56aCS2zFHQN78tGYvN0I+YU2ATgNjjq273evnlleGNlBIARkiwaC7 fIbXlHQkOKjQBpXDay3CKlO06KuYqtpc3aHde+TPzU0eAp2CfazZ++vA1hxJSToVfeKx Y30loZkxZ9X45dL7EAZJCOULjq5Y/nNTCy21vcBIoxcOC/DplPOJ/jrHi5ZFm9Kd8QPh k2Uev08kH0KgerEkapPElhl694SsZM/K7tkfajFsHIbcW0Hd7y0TVhs/A/9qe5lrM80v veJI3edeOls7JlWCQPzcDw7uHLcSq5yD8S2yGNPd0T9xvee6VGsf6m5uR0LyOUPVhE1o RjBA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=BFScEVdD; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-191483-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-191483-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d9443c01a7336-1f44c9b98dasi68120415ad.467.2024.05.27.15.16.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 15:16:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-191483-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=BFScEVdD; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-191483-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-191483-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 06BD2B22288 for ; Mon, 27 May 2024 22:15:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6590516939C; Mon, 27 May 2024 22:14:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="BFScEVdD" Received: from mail-yb1-f178.google.com (mail-yb1-f178.google.com [209.85.219.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1E5A2168C25 for ; Mon, 27 May 2024 22:14:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716848098; cv=none; b=i+rQiYFOeZEp3NDfyhE1pmnhIsrC6Oz//51do405T9Uux7TAsu+shr7MXu6V7PbOG8L5EJU7U7QQIyXgRGlrJYoD++/ecZyyyV7u+CqTL0503Z9WqbBZtpzlQHPeIATUx9CMca4zVUZ3wmy3e0rSJ96Y8If8GCo1KymLkjphM00= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716848098; c=relaxed/simple; bh=zkCc5qc834sm2jFXbJrz+qWjcuUHh5rZO02ixWNCZGg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=qVIktYZwAD0l8nojmbtiMTEFus3njMVuUL9DuGkqEtMnnW7pdib5PdN2ZA0DL1dm5N5OVu0IUELVl2ui9bH4HK8zv9q03aCvJYM4nd8zQrpssyjeTdoKPixjGRSlr1Dy+irj4AzCFnzcdAtpjOsGcHRd3tAJdVPkEAfAk3sEOhs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=BFScEVdD; arc=none smtp.client-ip=209.85.219.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-yb1-f178.google.com with SMTP id 3f1490d57ef6-df78b040314so206474276.0 for ; Mon, 27 May 2024 15:14:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1716848096; x=1717452896; darn=vger.kernel.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=MH5jBveEGD7wUqQ+hKTo7ViWmJ+iwz9fODsOR0liGjU=; b=BFScEVdD0lThi0CHoyjl4b+zcmmzlnHfOCOjyBLwkr48MkY7jUwzMZ1GwWIXQ5L7Tq 1p6eGgq8oG/HLtTryeRszd+nxXPrpjPVR7+IYIwJpzclJnabSigMRbRu4OfF+1T7W7SZ 8QEKv55UgmpA8wF+cnsTcs/YyD3Yqq3lDh+7w= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716848096; x=1717452896; 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=MH5jBveEGD7wUqQ+hKTo7ViWmJ+iwz9fODsOR0liGjU=; b=UrnMDbEQbAFJuPiZN6i3yHSWAjJPmnm76o99M197xRil5jSqt5xjL3P4SlhLcuD7sg fD2a8a3HwecSU1Rnlvy6LMN9cDyDug9YZfDarqiBUVjOkGLvpOU4OXqOtCJDjk5zrFpu 9IIB9/PFDB9+2GErXO4B3gd7wBMGzb0apLt1UeFQY/+vvec+fzbHdd2i4U3v2GJbIXCZ vL71K1H6i930+wBam7+tey+zonJC43o/cbVKWuwUQtBEWaFP610WjLelJkCoPimF4DRJ HlRMsdvu6XBYaMxmUjT/HK4ubEKa7Gv4ol4a+h9blMfdB0NmoZealZ4pp/ceeoVRqnyA 561Q== X-Forwarded-Encrypted: i=1; AJvYcCXLwrakoF48vRz52gpZ1E3SVhmMk8gP8pi4Y6yS/Mkha5MYnM8GF/X/1ris7a7N+7TFh2k97mDbBmleiu91FPBmZzCiwCfNvPXfTMuk X-Gm-Message-State: AOJu0YwGDlVCD0yeav825AOnNyn94VoxEGGAuWTMZAbiKHEmN6DSDGGb mX3Kx2PPuoYc5eAGxQfnejwMIu2oy+Ejv1Zq8VXjuBSBPb++Z/3BPrxgFMQ3Tg== X-Received: by 2002:a25:ada0:0:b0:dc2:421e:c943 with SMTP id 3f1490d57ef6-df7722597b7mr9399627276.42.1716848096193; Mon, 27 May 2024 15:14:56 -0700 (PDT) Received: from denia.c.googlers.com (125.135.86.34.bc.googleusercontent.com. [34.86.135.125]) by smtp.gmail.com with ESMTPSA id af79cd13be357-794abca58e6sm329740885a.18.2024.05.27.15.14.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 15:14:55 -0700 (PDT) From: Ricardo Ribalda Date: Mon, 27 May 2024 22:14:47 +0000 Subject: [PATCH 3/3] media: pci/ivtv: Use managed version of pci_enable_device Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240527-devm-itv-v1-3-f5829b8e7674@chromium.org> References: <20240527-devm-itv-v1-0-f5829b8e7674@chromium.org> In-Reply-To: <20240527-devm-itv-v1-0-f5829b8e7674@chromium.org> To: Andy Walls , Mauro Carvalho Chehab Cc: Hans Verkuil , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Ricardo Ribalda X-Mailer: b4 0.12.4 If there is any error during probing, we should probably leave the device in its previous state. pcim_ will take care of this. Signed-off-by: Ricardo Ribalda --- drivers/media/pci/ivtv/ivtv-driver.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/media/pci/ivtv/ivtv-driver.c b/drivers/media/pci/ivtv/ivtv-driver.c index 96f40c9685d2..ecc20cd89926 100644 --- a/drivers/media/pci/ivtv/ivtv-driver.c +++ b/drivers/media/pci/ivtv/ivtv-driver.c @@ -806,7 +806,7 @@ static int ivtv_setup_pci(struct ivtv *itv, struct pci_dev *pdev, IVTV_DEBUG_INFO("Enabling pci device\n"); - if (pci_enable_device(pdev)) { + if (pcim_enable_device(pdev)) { IVTV_ERR("Can't enable device!\n"); return -EIO; } @@ -1402,7 +1402,6 @@ static void ivtv_remove(struct pci_dev *pdev) free_irq(itv->pdev->irq, (void *)itv); - pci_disable_device(itv->pdev); for (i = 0; i < IVTV_VBI_FRAMES; i++) kfree(itv->vbi.sliced_mpeg_data[i]); -- 2.45.1.288.g0e0cd299f1-goog