Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3095388pxj; Mon, 17 May 2021 17:39:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJym7Rl/NQ5ET+2hgIiW3J8hB3XBQGOd2SfvfKzkFgJnGMNKRlEjXJ8BTX3UUc23qHP9GCn7 X-Received: by 2002:a6b:d20e:: with SMTP id q14mr2158454iob.200.1621298376461; Mon, 17 May 2021 17:39:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621298376; cv=none; d=google.com; s=arc-20160816; b=nzwE5mj0g+2GLpcg0l0PMg9cJfgwsPx6X+7ej1Y3JcpGoATASmz0Bz5I325nLHgDCt 19jzeCmsZxwFlI/1S+yD+y1EEkTXeezOVY4U6CPxZJRr4dXJMQofkcSK28CPkvGrZeK0 U+9dZN7ioxOwThixRaNQ+mbeTOKqz3LoVWHM+syFeW6JUXPY8gxBYT5fPGqqjvl0Cq+K cH6hV752KJOjVdQTRqXUCXXarxrQ33BBGy3aWI/ocdOBq46mPTnqUiR8Gc5t5L5E7szW Q+zx/WZ5LpGeKSI2Nn4lMr8xSKzLkuRgaRIaTUXmRarD2Mo9hhOUGWNWPPw/XxeqhVAc BY5Q== 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=GzIXW9FIzf7WkyY8s1g+0E0y2YzzzJD32Z1mGSLOJtM=; b=I1LV9oI7Uez79JR1yWdaY5k1/sl2Ky/aaE1QowFYO5UIZ/uUW4+W07F8qaVNdG7U4+ DrEuf7+bzqJ5oiDsJEPgN0Qkqyq71tkT6MX1AkhP35RfQPXXBfbYlDsJf0oOTROKzMtk oz+iUiNAQrycjSR+a/TWf+fqe76O0WufH+C3Ma8gffDI4Gs75qGuHDlsRxIP1rGPy/19 Rnj6U8BpvJ0tcN3MCkN12/zpJA4SUCBg7JU6mZABdvnpm/sBvxi1JVISIcT0fWZfds0s tUZVDS0hmfSQT6zDGZ+tWbcxSJvXr/bHDCst8kEtgvIuvO1744lvr3tXVaAbT30S8NOq zJNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=MUMCK1dg; 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 i17si19584516ila.99.2021.05.17.17.39.11; Mon, 17 May 2021 17:39:36 -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=MUMCK1dg; 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 S235423AbhEQO2e (ORCPT + 99 others); Mon, 17 May 2021 10:28:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:53290 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239472AbhEQOYN (ORCPT ); Mon, 17 May 2021 10:24:13 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C1EA86145F; Mon, 17 May 2021 14:12:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621260765; bh=YU7iGQimgJ3VKI8wwRhRPYmvBuXUT0P50iE+cSKr+Xo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MUMCK1dgrpfmjCW0YBFEjHpAJ1IVMmTtb3EX9bM35345G9gTCJcuol0uk/lxXrhGk pj0/cnahg8euzX14FiwkVPT2lOu/kYkRuzwYhNGdiueXiURYRCLmAoUvuEgDa+Cl0r qu3DJbpbHGOnTz7xqRqY7uou3ASXzTCkz6vMW2EA= 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.12 231/363] can: mcp251xfd: mcp251xfd_probe(): add missing can_rx_offload_del() in error path Date: Mon, 17 May 2021 16:01:37 +0200 Message-Id: <20210517140310.387940309@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210517140302.508966430@linuxfoundation.org> References: <20210517140302.508966430@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 15b04db6ed9c..4a742aa5c417 100644 --- a/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c +++ b/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c @@ -2957,10 +2957,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