Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1896159pxb; Mon, 23 Aug 2021 07:11:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwJ54HKnYtj9LhCiu9NOjgu6Co+dnATWNKYkV6E9LVQFtCBKwTfe++gBuRxHZUknjd9qVh6 X-Received: by 2002:a05:6e02:805:: with SMTP id u5mr22368168ilm.223.1629727883144; Mon, 23 Aug 2021 07:11:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629727883; cv=none; d=google.com; s=arc-20160816; b=W15QyD60rNHhNKAyrtrohxgkKIfXexsAlajVbScExZhcS4n1eCQWLFKIs5CxC7CnI5 b68fphWY+/JZvDFM2DxN7ko67Iv45uoCCH8C8cMZuEUyUBBSZIQxwvrd1KRLgbUoao1O V77GIsAsQGBS4Z7vIBoIUhVYLVdSGwy37jdohVDCmceBkIbGVNqVkOV6iWX6pUXStd0S hXBjBvVuNT0/ROmzwQOKpv0c0yUGNaEEv+V1G/pPkv3XDkjlBTboO7ZKnQ7Rq0eQZs+T E4xfaCojCYeC98djV1MUlvlhFYllmA+qTWehuqby92VsBtozmoDl8VROtdXiGM51Ar7/ 5cJw== 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 :message-id:date:subject:cc:to:from; bh=pQasMfulN5L75By2UJhbcFZ+lNumaV5LFLIoEQzsUsw=; b=pVQowGxbDcKf3nnHVHa3m+EhEuEBjhktDtbKbjKQcsYVEMnBf82ywpNEKq+yNVaU8+ 4aRAe5lkkLWlN4m4Y+fMNmqQ8bNB+FOB+QPMcfm9NemkaCqFbpKSngHGIh4lawvPIUB3 lwAFhEvuca7USlSD9YhytLcVitN3ngeu0Lhj3Zo/quj6mB/1NAl34XwszthCwl+0IiQu PnTweLhI9C4VK6FkEbINQ4HaMs5+Ye3wO0E19kpJf/vv7KSH1qA1+MJqjz3qQYWIMK6C QwCirkTA4demmYmBoPBnPN5qAwet9MoBu+tCYwNvUh/uIMQ4O2jQpREv9OdLGTMZ3+Qk Xvqg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i4si15070795ilv.27.2021.08.23.07.11.10; Mon, 23 Aug 2021 07:11:23 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229763AbhHWOKx (ORCPT + 99 others); Mon, 23 Aug 2021 10:10:53 -0400 Received: from cmccmta1.chinamobile.com ([221.176.66.79]:53750 "EHLO cmccmta1.chinamobile.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229653AbhHWOKx (ORCPT ); Mon, 23 Aug 2021 10:10:53 -0400 Received: from spf.mail.chinamobile.com (unknown[172.16.121.3]) by rmmx-syy-dmz-app04-12004 (RichMail) with SMTP id 2ee46123ac3323e-05df7; Mon, 23 Aug 2021 22:09:57 +0800 (CST) X-RM-TRANSID: 2ee46123ac3323e-05df7 X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 Received: from localhost.localdomain (unknown[223.112.105.130]) by rmsmtp-syy-appsvr02-12002 (RichMail) with SMTP id 2ee26123ac2fde0-cdfa1; Mon, 23 Aug 2021 22:09:56 +0800 (CST) X-RM-TRANSID: 2ee26123ac2fde0-cdfa1 From: Tang Bin To: davem@davemloft.net, mkl@pengutronix.de, wg@grandegger.com, kuba@kernel.org Cc: linux-can@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Tang Bin Subject: [PATCH] can: mscan: mpc5xxx_can: Remove useless BUG_ON() Date: Mon, 23 Aug 2021 22:10:33 +0800 Message-Id: <20210823141033.17876-1-tangbin@cmss.chinamobile.com> X-Mailer: git-send-email 2.20.1.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In the function mpc5xxx_can_probe(), the variale 'data' has already been determined in the above code, so the BUG_ON() in this place is useless, remove it. Signed-off-by: Tang Bin --- drivers/net/can/mscan/mpc5xxx_can.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/can/mscan/mpc5xxx_can.c b/drivers/net/can/mscan/mpc5xxx_can.c index 3b7465acd..35892c1ef 100644 --- a/drivers/net/can/mscan/mpc5xxx_can.c +++ b/drivers/net/can/mscan/mpc5xxx_can.c @@ -317,7 +317,6 @@ static int mpc5xxx_can_probe(struct platform_device *ofdev) clock_name = of_get_property(np, "fsl,mscan-clock-source", NULL); - BUG_ON(!data); priv->type = data->type; priv->can.clock.freq = data->get_clock(ofdev, clock_name, &mscan_clksrc); -- 2.20.1.windows.1