提交 fe23bcd9 编写于 作者: A Alexander Aring 提交者: Marcel Holtmann

at86rf230: fix page parameter constraints

Since commit e37d2ec8 ("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: NAlexander Aring <alex.aring@gmail.com>
Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
上级 039fada5
......@@ -1047,7 +1047,7 @@ at86rf230_channel(struct ieee802154_hw *hw, u8 page, u8 channel)
struct at86rf230_local *lp = hw->priv;
int rc;
if (page < 0 || page > 31 ||
if (page > 31 ||
!(lp->hw->phy->channels_supported[page] & BIT(channel))) {
WARN_ON(1);
return -EINVAL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册