Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2935310pxj; Sun, 6 Jun 2021 20:06:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyn3bUIovy8fefBRV6Jpu/KLq7WT+kavzjYEDdInflbi2LNlhkzYE8v5clI7/ctxeXA8fkB X-Received: by 2002:a17:906:71d2:: with SMTP id i18mr16529652ejk.373.1623035215382; Sun, 06 Jun 2021 20:06:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623035215; cv=none; d=google.com; s=arc-20160816; b=gdIl/7gwv9XcjHu/4SueE3dt69y0rWUjmhU/ApbHXOwGddjbqjxfDpG8hEvm8LnK8O Q9L8rgam1haHAly49bjqzWqH4fj5q7xLJ+EwTtjY2wE/+b7W6sDMN0STL/6SDg9Kq6rd tHMGT5jIUmM2XV2OZ/Tk3hhEidA6/xQMFmymW+v2EsTihfO69ITG7/bNcjk+wc2CbQKy Jmvyu4mpVesMsGDQDooz5UA2czYcERF9JGsIaH8/x1BcC6FI9LF4WSv4MpNwqVuWsjNz /0ns58l/3gfMRs5ZzMLpi7ub2hCPORyCDtyvr6SEEjIkqz3k2WwudgeMttIXkzxQtnJ9 /0YQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=iesLO8sOZEP3r9Yo0ryUKFTxWZnJnNVA8Ji/zbSbO+4=; b=Dl1WaTMXkYbdxXXdUd8WH0qaVBr5vZxJJPwlstMXD+8SC3VRWo7Z1Kw4JhIvAF4z29 Dm7LaMFxAso0u9t7TOjmagJtOOuXSSFVacOwJjrPc+nQBGLKWIVlOPJLWRgcxgA7F581 N4pESJsy4rJ2xJkl/LYqhaJGQIlqFB64rjSSSr6PzcCcTruaDnLeJdbeDYdoyAgN9g5J NNni4t/X8LTPqPF4QqMpe/anRV02NGXBANA/Bi84YDCldFyFdDUxX1Q8iZ8MHKaht/S4 ozkuC/ujS3o/CGPE2Dt2nHEe2/4b4ghC2zGZUkzPEUKpfAv5hs5Kg3UvWCnxqsBsCQPb 6B8Q== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y18si3670600edv.141.2021.06.06.20.06.32; Sun, 06 Jun 2021 20:06:55 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230227AbhFGDE0 (ORCPT + 99 others); Sun, 6 Jun 2021 23:04:26 -0400 Received: from szxga08-in.huawei.com ([45.249.212.255]:4329 "EHLO szxga08-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230147AbhFGDE0 (ORCPT ); Sun, 6 Jun 2021 23:04:26 -0400 Received: from dggemv704-chm.china.huawei.com (unknown [172.30.72.55]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4Fyyj51S6Dz1BJnb; Mon, 7 Jun 2021 10:57:45 +0800 (CST) Received: from dggemi762-chm.china.huawei.com (10.1.198.148) by dggemv704-chm.china.huawei.com (10.3.19.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2176.2; Mon, 7 Jun 2021 11:02:33 +0800 Received: from linux-lmwb.huawei.com (10.175.103.112) by dggemi762-chm.china.huawei.com (10.1.198.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Mon, 7 Jun 2021 11:02:32 +0800 From: Zou Wei To: CC: , , Zou Wei Subject: [PATCH -next] i2c: Fix missing pci_disable_device() on error in ali1535_setup() Date: Mon, 7 Jun 2021 11:21:08 +0800 Message-ID: <1623036068-30668-1-git-send-email-zou_wei@huawei.com> X-Mailer: git-send-email 2.6.2 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.103.112] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To dggemi762-chm.china.huawei.com (10.1.198.148) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix the missing pci_disable_device() before return from ali1535_setup() in the error handling case. Reported-by: Hulk Robot Signed-off-by: Zou Wei --- drivers/i2c/busses/i2c-ali1535.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/i2c/busses/i2c-ali1535.c b/drivers/i2c/busses/i2c-ali1535.c index fb93152..bdbaf79 100644 --- a/drivers/i2c/busses/i2c-ali1535.c +++ b/drivers/i2c/busses/i2c-ali1535.c @@ -206,6 +206,7 @@ static int ali1535_setup(struct pci_dev *dev) exit_free: release_region(ali1535_smba, ALI1535_SMB_IOSIZE); exit: + pci_disable_device(dev); return retval; } -- 2.6.2