mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-07 23:28:55 +00:00
at86rf230: fix page parameter constraints
Since commit e37d2ec82a
("mac802154: ops:
declare channel and page as u8") the page parameter can't be below zero.
This patch fix a kbuild test robot warning. Furthermore this check
should be removed and handled by netlink 802.15.4 interface.
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
This commit is contained in:
parent
039fada5cd
commit
fe23bcd920
1 changed files with 1 additions and 1 deletions
|
@ -1047,7 +1047,7 @@ at86rf230_channel(struct ieee802154_hw *hw, u8 page, u8 channel)
|
||||||
struct at86rf230_local *lp = hw->priv;
|
struct at86rf230_local *lp = hw->priv;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
if (page < 0 || page > 31 ||
|
if (page > 31 ||
|
||||||
!(lp->hw->phy->channels_supported[page] & BIT(channel))) {
|
!(lp->hw->phy->channels_supported[page] & BIT(channel))) {
|
||||||
WARN_ON(1);
|
WARN_ON(1);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
Loading…
Add table
Reference in a new issue