Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp505315pxj; Tue, 18 May 2021 08:11:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzLYj0VTAv39T/k/EjFf1tMz408Jt6pU7khuEZpdvKp5aMvmOFRzqh8fwtBLGqCMDGNuClg X-Received: by 2002:aa7:c9ce:: with SMTP id i14mr7627541edt.148.1621350700003; Tue, 18 May 2021 08:11:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621350699; cv=none; d=google.com; s=arc-20160816; b=j/4TykOABMsYKq2ZZXC2K+o3bZenJQrf0Sj95egekivByj+iXcmLLFGkaXXnSiDQgX avE/Vx/jrtjJRFdg2Fy5AZrefPgqdPK/f+G0IVfXZQk2aTBLppuejvpIjd4X0Xo+6j+b pFNY3/1t82X+qR87ACyUQxQTpy6uGh2wLMr9JXxLJ+KBsrfb25s7OXVmVotWs7GnTWmM brJEfo8dCtncCNjW00aB1okHTnfEF2gKX5q+A8YH0ZBaEpD5S6yhaFTdsnMudgTNWTGj RliB/qkFk3tF7T+zVr6ryH/eN53Xq4aEFRxnm8W3kvHKKZ3e4rxXz15WQP2sRtuGl00t gUaw== 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=kl46EEOM38Xfb6AoYV45PTXuvAuSSUQ2cLZLcen26OU=; b=uXwt/SGHVgY5R4oIKw3Ao4Ai3RjjHjfxzBxUA8BV5L8mPzIWv7NTVO35dONoVmTeC7 2jN8dgb27NvpIH/SxCCJkIZgxOUVcy9wOgyvkYspg01mqCYQVEikcb1lURMDM3Y4X6O0 B0TFxVN1Hf6a+bZp0tnecaLRs9dGTXoiG//Jykzw29a7FuSdn9+HWLiC9Ay0wimdDZe6 Dsa/GSwLi2ecd2gfrSevrr+qkaMcWMNOgzO04rfNpBeIA9rfgaYim4Xu23S0wrahd1F9 4XHptcBtcE9ClzSsJkMOGy3n+uaCChvYbwsN43a4/3voSWF+C2e1Win+YTDErkyuMA4A nZQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=AjoMjzz4; 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 t21si17574137edd.145.2021.05.18.08.11.07; Tue, 18 May 2021 08:11:39 -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=@linuxfoundation.org header.s=korg header.b=AjoMjzz4; 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 S243568AbhEQPxX (ORCPT + 99 others); Mon, 17 May 2021 11:53:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:43488 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243734AbhEQPf6 (ORCPT ); Mon, 17 May 2021 11:35:58 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7F7E561CEA; Mon, 17 May 2021 14:39:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621262394; bh=MwOCbBcfvlb0ciXm2Mc6pB0nprG2EIV1HA5/KJiix2U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AjoMjzz4Nghy2rjfcmyJoKPPR7sLgiTNMat3+JXXLQDv4K3azNSIQ21UdRAS4mUKE Vbm193/scZlSZUZ4k/3Y+UGLFUPKz910xtSQcUX21qJ2JdqOs/6sAe1c7hen/vWEzH 3HGD2lRXBtxJCYw+Xuxw223s5o1pk+hCFC2xoe/s= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Marc Kleine-Budde , Sasha Levin Subject: [PATCH 5.10 178/289] can: mcp251xfd: mcp251xfd_probe(): add missing can_rx_offload_del() in error path Date: Mon, 17 May 2021 16:01:43 +0200 Message-Id: <20210517140311.110782258@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210517140305.140529752@linuxfoundation.org> References: <20210517140305.140529752@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: Marc Kleine-Budde [ Upstream commit 4376ea42db8bfcac2bc3a30bba93917244a8c2d4 ] This patch adds the missing can_rx_offload_del(), that must be called if mcp251xfd_register() fails. Fixes: 55e5b97f003e ("can: mcp25xxfd: add driver for Microchip MCP25xxFD SPI CAN") Link: https://lore.kernel.org/r/20210504091838.1109047-1-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde Signed-off-by: Sasha Levin --- drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c b/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c index 096d818c167e..68ff931993c2 100644 --- a/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c +++ b/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c @@ -2870,10 +2870,12 @@ static int mcp251xfd_probe(struct spi_device *spi) err = mcp251xfd_register(priv); if (err) - goto out_free_candev; + goto out_can_rx_offload_del; return 0; + out_can_rx_offload_del: + can_rx_offload_del(&priv->offload); out_free_candev: spi->max_speed_hz = priv->spi_max_speed_hz_orig; -- 2.30.2