3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-25 09:39:25 +01:00

netdev: Skip a memcpy when no data to copy

This commit is contained in:
Andrew Zaborowski 2019-01-15 07:34:06 +01:00 committed by Denis Kenzior
parent 52b3268b78
commit 2600c446ab

View File

@ -4048,7 +4048,9 @@ int netdev_set_rssi_report_levels(struct netdev *netdev, const int8_t *levels,
}
done:
if (levels_num)
memcpy(netdev->rssi_levels, levels, levels_num);
netdev->rssi_levels_num = levels_num;
netdev_rssi_level_init(netdev);