aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVarka Bhadram <varkabhadram@gmail.com>2015-06-23 02:11:03 -0400
committerMarcel Holtmann <marcel@holtmann.org>2015-07-23 11:10:48 -0400
commit8f451829dd97fb22f03844ca52a49828e2e1d666 (patch)
tree05b1b95656fd6a925d8e80b62c3dc0c49d1555cd
parent301d7d42a207e0d4f5bf11c7e2b6862ddebc8c36 (diff)
mac802154: use WARN_ON() macro
This patch will generate the warning if the required driver ops were not defined. Also it removes unnecessary debug message. Signed-off-by: Varka Bhadram <varkab@cdac.in> Acked-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
-rw-r--r--net/mac802154/main.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/net/mac802154/main.c b/net/mac802154/main.c
index 356b346e1ee8..4caf04b676d7 100644
--- a/net/mac802154/main.c
+++ b/net/mac802154/main.c
@@ -58,11 +58,9 @@ ieee802154_alloc_hw(size_t priv_data_len, const struct ieee802154_ops *ops)
58 struct ieee802154_local *local; 58 struct ieee802154_local *local;
59 size_t priv_size; 59 size_t priv_size;
60 60
61 if (!ops || !(ops->xmit_async || ops->xmit_sync) || !ops->ed || 61 if (WARN_ON(!ops || !(ops->xmit_async || ops->xmit_sync) || !ops->ed ||
62 !ops->start || !ops->stop || !ops->set_channel) { 62 !ops->start || !ops->stop || !ops->set_channel))
63 pr_err("undefined IEEE802.15.4 device operations\n");
64 return NULL; 63 return NULL;
65 }
66 64
67 /* Ensure 32-byte alignment of our private data and hw private data. 65 /* Ensure 32-byte alignment of our private data and hw private data.
68 * We use the wpan_phy priv data for both our ieee802154_local and for 66 * We use the wpan_phy priv data for both our ieee802154_local and for