Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3602765pxb; Mon, 24 Jan 2022 13:16:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJx8ljCqVe9woc/7vrP5Csok+aFdEQmfKo3izQrCdv4tNe3TYlOKiI9vQP3oqdbueDS9wL9S X-Received: by 2002:a63:6c8:: with SMTP id 191mr1492192pgg.349.1643059001716; Mon, 24 Jan 2022 13:16:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643059001; cv=none; d=google.com; s=arc-20160816; b=cUy9zH9EbkPKzEA9N1yOSWaV9IKJ9WAYo9zHY3DuSrHQY49RkvJ5Hn+/qtxahUz+79 YU1SbOnyn/LP3jelLj++Po+VAtEGuHuGrS/fH94bQ9y7W86r8bko1mrnZvdlI2LhOP5N QmUmyjQnxYicpwVS0MrelY3jKnabWTe5EJwMsGYUn3S06NKvRscdBGm3A8ikvbMlM1CJ oggSuveM1kfS5lFsebjliuoL52XrrmJDFeH6XcIBJuaouzXbgEFi/YZwa8KifPYvIirs 9pWMa5XTYzd5HPVT+Bg0P5wglFoa7b82I7IuiPAfOHIWnYUrbuaHkHUz7uxPLx0I366A j5dQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=NRrOvw79Wf6tY/ksGkZzQCEqdQQ2n9t9Q/DcEmaN0fo=; b=y8g6Bi2/Vcltf20XsryYv2HGgzPdXz8bC/jG1jLDGWFxdvx996eiBoPfWQ0ZUoyb55 ATY871xf6BFtOxYWVi0ZHu0dvr3HwZA1epe+/k19L18PVLs07bwqCIIdU2lyAFaVeMLZ X8RHImnYj6b62IjKYl6blK5hnvrRPiUNhFey8kn4PdrfSkiRsE+l0cIGGMecIwjskifQ hqon/h/TeANMKWP1W7n7g+Mm/t3XSrpho97L1wyvOZAKUZUDwQYIvK/f1ADLH6hFF+2a Exd9IiHkI2ZBSBDtHjuuTooBC6y7XaHmjmxHqMXWeV9TF1RJdxAbO61+WLSHJ2EVv/lL GyzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=wIfdRS8M; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m3si3535813plx.483.2022.01.24.13.16.29; Mon, 24 Jan 2022 13:16:41 -0800 (PST) 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=@linuxfoundation.org header.s=korg header.b=wIfdRS8M; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1392430AbiAXUvN (ORCPT + 99 others); Mon, 24 Jan 2022 15:51:13 -0500 Received: from dfw.source.kernel.org ([139.178.84.217]:51138 "EHLO dfw.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1383608AbiAXU11 (ORCPT ); Mon, 24 Jan 2022 15:27:27 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 090E361502; Mon, 24 Jan 2022 20:27:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E01ABC340E5; Mon, 24 Jan 2022 20:27:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643056046; bh=zrfxcHLGusgtamEGQCTI+icznpvNbZqhf7dBNr17trg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wIfdRS8MWj1807QBkkKllAnKb7UOFUQ6bsy88P9nOTvhrBEgBR8N1jVQibXJMpA3+ jyHNSSzhr2pUIqr9n1kisynQ/VDnYb2SBcq4bN8jjR2IAqm7t0XlCaQOC0+UpXPnNe D8A/BHwPTmaUaVJIsCO9nPkA4rVqAfF1Ci7Yaf38= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Subbaraya Sundeep , Sunil Goutham , "David S. Miller" , Sasha Levin Subject: [PATCH 5.15 352/846] octeontx2-af: Increment ptp refcount before use Date: Mon, 24 Jan 2022 19:37:49 +0100 Message-Id: <20220124184113.097587510@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184100.867127425@linuxfoundation.org> References: <20220124184100.867127425@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Subbaraya Sundeep [ Upstream commit 93440f4888cf049dbd22b41aaf94d2e2153b3eb8 ] Before using the ptp pci device by AF driver increment the reference count of it. Fixes: a8b90c9d26d6 ("octeontx2-af: Add PTP device id for CN10K and 95O silcons") Signed-off-by: Subbaraya Sundeep Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/marvell/octeontx2/af/ptp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/marvell/octeontx2/af/ptp.c b/drivers/net/ethernet/marvell/octeontx2/af/ptp.c index 9b8e59f4c206d..77cb52b80c60f 100644 --- a/drivers/net/ethernet/marvell/octeontx2/af/ptp.c +++ b/drivers/net/ethernet/marvell/octeontx2/af/ptp.c @@ -85,6 +85,8 @@ struct ptp *ptp_get(void) /* Check driver is bound to PTP block */ if (!ptp) ptp = ERR_PTR(-EPROBE_DEFER); + else + pci_dev_get(ptp->pdev); return ptp; } -- 2.34.1