Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DB966C27C76 for ; Wed, 25 Jan 2023 19:51:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235817AbjAYTvZ (ORCPT ); Wed, 25 Jan 2023 14:51:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235541AbjAYTvK (ORCPT ); Wed, 25 Jan 2023 14:51:10 -0500 Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA66A5924A for ; Wed, 25 Jan 2023 11:51:08 -0800 (PST) Received: by mail-ej1-x633.google.com with SMTP id ud5so50647307ejc.4 for ; Wed, 25 Jan 2023 11:51:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=KMj657mIBfjdrk+ldR8wMbHCeTfGxrOBp5iVvF9MTxo=; b=EFj5BZjAFL8VzzzsMv8HLmG2IMjSc/WtgRSZNYk8gLngSYkDAB7eJ0/CCLwCKDaI8l uL+WH4aSlWtfVc22Wv6c8qjPoM+sYBY6mLCHZ7gdQcFQi5JeTiDfy4gtv54pZ7l6soPz gQqOL6bmeJip0Aj839wyJTatzTopDCW6oma33LKx2tWRNP7+NE6T1zYTt7WOKyxx0B8S qzEBX/o0L1jrYmx/lWwxUqgK3kfSiaFXGSFeUUUZxiIwHRvITJLCcZCjVM1HI8mSuqbW nEvIPqZQkpRs4Wm6SrBwyTohOrAoAXEcxldQwfcvvWBAV+gwQNILpSIq7q1/rASXR+v2 MGPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KMj657mIBfjdrk+ldR8wMbHCeTfGxrOBp5iVvF9MTxo=; b=fpSK4wydGBLJIV7FQZOq8thLJ/wtk5Rf9vNm8hbcpm7XGcjBHzqHTtSNoKFtTxV4nq Ut32JejFC1HzVTZ1iJwIYirvYgMsgWWFBRMqQ2L1fS03BX9aTS5Qn8naHg8nk83izom8 2bBQ5hHcKkmvzecpK5jII5DQJCGSymy91etAs+dTq38NsD3M+QTd6zy8ETMofl/SSZq2 cQmFCVfoUBlNgGNGUuWAniUpNhWjx14veZcObA/5tSIwqfUEQj/bI18e4YjqXtkILObE qjGuXY+p0BALCNh6lrURaL4y3BRmtVuuiW6t516h0+qj/2r4jTq31Mjh4qKIXh/Ro+Qc gxNQ== X-Gm-Message-State: AFqh2kq5g7i1nbdugRjQXAVuhJFLe17rnvhO+1eMFNHSs9bxGufrCV0B adlV67w0Eg3JVI/W7YRJQLTPUQ== X-Google-Smtp-Source: AMrXdXuix7QsoU2d1BVeDRHLLsHMUpywYIGfZKQCAfkvSm7YyMcgG+rSDb7g9hNSI6FN2I92yX2WIQ== X-Received: by 2002:a17:906:644f:b0:877:6549:bb6 with SMTP id l15-20020a170906644f00b0087765490bb6mr27947745ejn.58.1674676267325; Wed, 25 Jan 2023 11:51:07 -0800 (PST) Received: from blmsp.fritz.box ([2001:4091:a247:815f:ef74:e427:628a:752c]) by smtp.gmail.com with ESMTPSA id s15-20020a170906454f00b00872c0bccab2sm2778830ejq.35.2023.01.25.11.51.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Jan 2023 11:51:06 -0800 (PST) From: Markus Schneider-Pargmann To: Marc Kleine-Budde , Chandrasekar Ramakrishnan , Wolfgang Grandegger Cc: Vincent MAILHOL , linux-can@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Markus Schneider-Pargmann Subject: [PATCH v2 03/18] can: m_can: Remove repeated check for is_peripheral Date: Wed, 25 Jan 2023 20:50:44 +0100 Message-Id: <20230125195059.630377-4-msp@baylibre.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230125195059.630377-1-msp@baylibre.com> References: <20230125195059.630377-1-msp@baylibre.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Merge both if-blocks to fix this. Signed-off-by: Markus Schneider-Pargmann --- drivers/net/can/m_can/m_can.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c index 8ccf20f093f8..33abe938c30b 100644 --- a/drivers/net/can/m_can/m_can.c +++ b/drivers/net/can/m_can/m_can.c @@ -1592,10 +1592,8 @@ static int m_can_close(struct net_device *dev) cdev->tx_skb = NULL; destroy_workqueue(cdev->tx_wq); cdev->tx_wq = NULL; - } - - if (cdev->is_peripheral) can_rx_offload_disable(&cdev->offload); + } close_candev(dev); -- 2.39.0