3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-18 10:19:24 +01:00

device: Don't check count upper limit twice

We already check it once in the for loop above
This commit is contained in:
Denis Kenzior 2017-05-30 11:39:26 -05:00
parent 570b483264
commit f38287f457

View File

@ -1728,7 +1728,7 @@ static struct l_dbus_message *device_signal_agent_register(struct l_dbus *dbus,
levels[count++] = val;
}
if (count < 1 || count > 16)
if (count < 1)
return dbus_error_invalid_args(message);
err = netdev_set_rssi_report_levels(device->netdev, levels, count);