From patchwork Sat Nov 26 11:31:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Shixin X-Patchwork-Id: 26207 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp4566479wrr; Sat, 26 Nov 2022 02:46:56 -0800 (PST) X-Google-Smtp-Source: AA0mqf6jYJrVHhsRVF6O8Gn+AX0ixhsmJ7/UlUUXEf8DC1G1t/rindyj36a8uWNYVKYINBSwYNGG X-Received: by 2002:a05:6402:1f89:b0:458:caec:8f1e with SMTP id c9-20020a0564021f8900b00458caec8f1emr38884607edc.280.1669459615976; Sat, 26 Nov 2022 02:46:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669459615; cv=none; d=google.com; s=arc-20160816; b=GDziqVey6EFdIAS4WVq93knBKZZ5P+/W0pk1nzmcc/nb3E9nuOhHyMCphEGK69Jh9U pA8D7SQqV6CDMExqoJMzlR/r2tbQ1+em1kgoeFLQxOw/Myq/3fw0A1nfJtttWWjKTpTt 5jPc9rYg3NAv1sVTXVFuxHc2WGSevGRORMY9i01mOLziO02QteWPYjfY35NnPgdVvR+H WcQf3FVF6CKlxXsVkPBbJrNJZrQP4SoAupUN/Gj42ZnQn7F5gtryk8AB6V6fw7uawWwI p/CSAkq6TFKJeVWuOB8mUohT2Dm+2EJ5D0pL6RU+dVKU1gFCyrLBnchpsjdMsxK5gFPU c9gQ== 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=GgvAjFYs6SPYx2aNgmpFb6Ej7Jj8uxFo/Yv1Waij8vQ=; b=iS3T6uSqZygdOeqphNNgj/eYR1/m20TUFEengm9NKvNnysdVu17IlJRtmfcJsJyR92 7C/KKSkl/WeGdmDrqiDQhCYWwR4BhCN7eC+zYg5BKum3hEK/ome37JuwvtHqnF2wSCft f1qi0Rk/7kW3xZBuDZ3SBZa4ZCDiUHZ+oxmMGnzw7s0IQK6FG7iQ6Q+BTTHFJk+pyFPD I81e3iX455O8ELxjA3L9gp+IJsr6kgROlgsZTiqbATBFJnELV3AlGuw2hpPZw55ZCqPB q1ZKbz13d/xg84WaND/pje4a/UXY1X8Tj4zGflzOKTFS8aIIiIS4Pw8YQD+HPmV9lWbN JORQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e6-20020a056402190600b0046b00aab3e3si144767edz.170.2022.11.26.02.46.33; Sat, 26 Nov 2022 02:46:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229509AbiKZKp4 (ORCPT + 99 others); Sat, 26 Nov 2022 05:45:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229712AbiKZKpe (ORCPT ); Sat, 26 Nov 2022 05:45:34 -0500 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D7D122CDE6; Sat, 26 Nov 2022 02:44:08 -0800 (PST) Received: from dggpemm500021.china.huawei.com (unknown [172.30.72.56]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4NK7ch0ywLz15Mr5; Sat, 26 Nov 2022 18:43:32 +0800 (CST) Received: from dggpemm100009.china.huawei.com (7.185.36.113) by dggpemm500021.china.huawei.com (7.185.36.109) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Sat, 26 Nov 2022 18:44:06 +0800 Received: from huawei.com (10.175.113.32) by dggpemm100009.china.huawei.com (7.185.36.113) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Sat, 26 Nov 2022 18:44:06 +0800 From: Liu Shixin To: Mauro Carvalho Chehab CC: , , Liu Shixin Subject: [PATCH] media: saa7164: fix missing pci_disable_device() Date: Sat, 26 Nov 2022 19:31:26 +0800 Message-ID: <20221126113126.3291673-1-liushixin2@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Originating-IP: [10.175.113.32] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggpemm100009.china.huawei.com (7.185.36.113) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750555286317711517?= X-GMAIL-MSGID: =?utf-8?q?1750555286317711517?= Add missing pci_disable_device() in the error path in saa7164_initdev(). Fixes: 1da177e4c3f4 ("V4L/DVB (12923): SAA7164: Add support for the NXP SAA7164 silicon") Signed-off-by: Liu Shixin --- drivers/media/pci/saa7164/saa7164-core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/media/pci/saa7164/saa7164-core.c b/drivers/media/pci/saa7164/saa7164-core.c index d5f32e3ff544..754c8be1b6d8 100644 --- a/drivers/media/pci/saa7164/saa7164-core.c +++ b/drivers/media/pci/saa7164/saa7164-core.c @@ -1259,7 +1259,7 @@ static int saa7164_initdev(struct pci_dev *pci_dev, if (saa7164_dev_setup(dev) < 0) { err = -EINVAL; - goto fail_free; + goto fail_dev; } /* print pci info */ @@ -1427,6 +1427,8 @@ static int saa7164_initdev(struct pci_dev *pci_dev, fail_irq: saa7164_dev_unregister(dev); +fail_dev: + pci_disable_device(pci_dev); fail_free: v4l2_device_unregister(&dev->v4l2_dev); kfree(dev);