From patchwork Fri Jul 6 08:12:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Schmidt X-Patchwork-Id: 10510997 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DB3786024A for ; Fri, 6 Jul 2018 08:12:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CDFD628161 for ; Fri, 6 Jul 2018 08:12:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C1A96284E9; Fri, 6 Jul 2018 08:12:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B998428161 for ; Fri, 6 Jul 2018 08:12:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753648AbeGFIMg (ORCPT ); Fri, 6 Jul 2018 04:12:36 -0400 Received: from proxima.lasnet.de ([78.47.171.185]:50533 "EHLO proxima.lasnet.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753519AbeGFIMf (ORCPT ); Fri, 6 Jul 2018 04:12:35 -0400 Received: from knut.Speedport_W_724V_09011603_05_013 (p200300E9D74B08E63252CBFFFE54190F.dip0.t-ipconnect.de [IPv6:2003:e9:d74b:8e6:3252:cbff:fe54:190f]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: stefan@sostec.de) by proxima.lasnet.de (Postfix) with ESMTPSA id 25AA0C821B; Fri, 6 Jul 2018 10:12:34 +0200 (CEST) From: Stefan Schmidt To: aring@mojatatu.com Cc: linux-wpan@vger.kernel.org, Stefan Schmidt Subject: [PATCH 1/3] ieee802154: at86rf230: switch from BUG_ON() to WARN_ON() on problem Date: Fri, 6 Jul 2018 10:12:10 +0200 Message-Id: <20180706081212.4776-2-stefan@datenfreihafen.org> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180706081212.4776-1-stefan@datenfreihafen.org> References: <20180706081212.4776-1-stefan@datenfreihafen.org> Sender: linux-wpan-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wpan@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The check is valid but it does not warrant to crash the kernel. A WARN_ON() is good enough here. Found by checkpatch. Signed-off-by: Stefan Schmidt --- drivers/net/ieee802154/at86rf230.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ieee802154/at86rf230.c b/drivers/net/ieee802154/at86rf230.c index 77abedf0b524..7b3a381d198a 100644 --- a/drivers/net/ieee802154/at86rf230.c +++ b/drivers/net/ieee802154/at86rf230.c @@ -940,7 +940,7 @@ at86rf230_xmit(struct ieee802154_hw *hw, struct sk_buff *skb) static int at86rf230_ed(struct ieee802154_hw *hw, u8 *level) { - BUG_ON(!level); + WARN_ON(!level); *level = 0xbe; return 0; }