1
0
Fork 0

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>
steinar/wifi_calib_4_9_kernel
Varka Bhadram 2015-06-23 11:41:03 +05:30 committed by Marcel Holtmann
parent 301d7d42a2
commit 8f451829dd
1 changed files with 2 additions and 4 deletions

View File

@ -58,11 +58,9 @@ ieee802154_alloc_hw(size_t priv_data_len, const struct ieee802154_ops *ops)
struct ieee802154_local *local;
size_t priv_size;
if (!ops || !(ops->xmit_async || ops->xmit_sync) || !ops->ed ||
!ops->start || !ops->stop || !ops->set_channel) {
pr_err("undefined IEEE802.15.4 device operations\n");
if (WARN_ON(!ops || !(ops->xmit_async || ops->xmit_sync) || !ops->ed ||
!ops->start || !ops->stop || !ops->set_channel))
return NULL;
}
/* Ensure 32-byte alignment of our private data and hw private data.
* We use the wpan_phy priv data for both our ieee802154_local and for