mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-22 13:02:44 +01:00
netdev: Skip a memcpy when no data to copy
This commit is contained in:
parent
52b3268b78
commit
2600c446ab
@ -4048,7 +4048,9 @@ int netdev_set_rssi_report_levels(struct netdev *netdev, const int8_t *levels,
|
||||
}
|
||||
|
||||
done:
|
||||
memcpy(netdev->rssi_levels, levels, levels_num);
|
||||
if (levels_num)
|
||||
memcpy(netdev->rssi_levels, levels, levels_num);
|
||||
|
||||
netdev->rssi_levels_num = levels_num;
|
||||
netdev_rssi_level_init(netdev);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user