Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3813065pxv; Mon, 28 Jun 2021 13:34:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyOjDorl6C44FIXva6YD11wyA2PQrYypIOfkEHaZqe7sPG/RsQy0LiZ6ulOK7yHuVKwnEx1 X-Received: by 2002:a02:3781:: with SMTP id r123mr1259263jar.26.1624912488997; Mon, 28 Jun 2021 13:34:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624912488; cv=none; d=google.com; s=arc-20160816; b=Z6q8KxZxZDHcBrt95OBV/2fHAI6CRT4L0JNeSPrjaLm1YcnSmVRYaTQ66opa3SShlb XQbalunH2/y+DgUV2Jlw2rvbyVgRyiXCXv/E6WmoHMEPhXMU93sBr7jH90S9MztY/3ZE WZyPRYUnSZY7cbcp4agi12v62uhiq7DfHQVgbgZriCm3syrYDOHiTm3V6r/YwP3D6Axx uV6Mx87b2+Hr/qp5HnX4O0bWiTW08PZWBXDMRWhGnaCjerno2sD5O9ccUnROmUyN6bzH NHYoSPUvr6vb3wVuGVD/YR5Zt+0P2tgeL0dJXGwPYP+MNcEXpC0AihT/4GrZneukjCU8 35DQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=aeI/kJoXA1FLqeh3WJs1riTOAPfa1WAVakj6zvCtSTA=; b=AbtdjyjwrH8PyiLXZpW1geSuZo2LGvALIRcIUDQSy/t/yyNmJd9m4oBQc+z2dr3p/e B5RoaeObKGJbgcIutye5GcmgEi/9miQiEgej90l+2izevoGZhv0TaCux0s0sZASdLO3R XlLy8SxSE6W21BZNnCkXIBlTafJpm/3wA3v7UqYCcMWPRFbWsCVaouiV2QHYnOgbS3V6 +WosS762RjFo0tY/wzo26GKMR3YHiL3axwTWhru4zKazcW9xZ25CA/xs324CoAOc5gnq AZhFOwvL0KzReXpDAQP6uIEBWyPLhAr5NCcrdHIiBw3wvqNLkQjNkn1wYjbsbMPsIZVV 47vg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pU6XlyK0; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v126si16727119iof.68.2021.06.28.13.34.33; Mon, 28 Jun 2021 13:34:48 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pU6XlyK0; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237761AbhF1PKY (ORCPT + 99 others); Mon, 28 Jun 2021 11:10:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:54532 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236460AbhF1OtX (ORCPT ); Mon, 28 Jun 2021 10:49:23 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 153DD61D1F; Mon, 28 Jun 2021 14:36:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624891015; bh=Bx6wtprcLfqR0Qdk11ebcb+1KV7bus5+2g5xRipo7Sg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pU6XlyK0/3pDmI0yC9/bRBnyBcOE07VlfgsuLivjYLjrfHFX6e66IgPNIr2dxcGx/ yctYNDp+2tQGxtGtxgZHZe9btTpzWAl8dHS+dzJuCSjvm8ST/Q7nAz3jxlN1yaWN8X hZOkNJBXSfh9Dv0TywDqDZ80njKhPngXJjlTRGIRrChdjL1nxxXwfkk5wO2kBs8Sul ixcXCjDjDVHXX7tV4NwAE7Z4HGRwVvRpc2hAKFV72XvQix6lrXBwIB8cGbpZWt7ZIr 2Dvw2NsIWEkSlGmCy2EOZe1lHV+jSvrpv8YDQkB4IXpBQE34baQ7qh5WBYnz1D1CwI Z8BJmV24k0Jqw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Christophe JAILLET , "David S . Miller" , Sasha Levin Subject: [PATCH 4.14 28/88] alx: Fix an error handling path in 'alx_probe()' Date: Mon, 28 Jun 2021 10:35:28 -0400 Message-Id: <20210628143628.33342-29-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210628143628.33342-1-sashal@kernel.org> References: <20210628143628.33342-1-sashal@kernel.org> MIME-Version: 1.0 X-KernelTest-Patch: http://kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.14.238-rc1.gz X-KernelTest-Tree: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git X-KernelTest-Branch: linux-4.14.y X-KernelTest-Patches: git://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git X-KernelTest-Version: 4.14.238-rc1 X-KernelTest-Deadline: 2021-06-30T14:36+00:00 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Christophe JAILLET [ Upstream commit 33e381448cf7a05d76ac0b47d4a6531ecd0e5c53 ] If an error occurs after a 'pci_enable_pcie_error_reporting()' call, it must be undone by a corresponding 'pci_disable_pcie_error_reporting()' call, as already done in the remove function. Fixes: ab69bde6b2e9 ("alx: add a simple AR816x/AR817x device driver") Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/atheros/alx/main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/atheros/alx/main.c b/drivers/net/ethernet/atheros/alx/main.c index ce2e64410823..bb0e217460c9 100644 --- a/drivers/net/ethernet/atheros/alx/main.c +++ b/drivers/net/ethernet/atheros/alx/main.c @@ -1857,6 +1857,7 @@ static int alx_probe(struct pci_dev *pdev, const struct pci_device_id *ent) free_netdev(netdev); out_pci_release: pci_release_mem_regions(pdev); + pci_disable_pcie_error_reporting(pdev); out_pci_disable: pci_disable_device(pdev); return err; -- 2.30.2