drivers: wifi: Fix the use of net_pkt_write() in eswifi driver

net_pkt_write() function returns 0 on success. But in this driver a
warning is thrown when zero is returned. Hence fix the driver to throw
the warning only when the negative value is returned.

Signed-off-by: NavinSankar Velliangiri <navin@linumiz.com>
This commit is contained in:
NavinSankar Velliangiri 2019-11-26 15:08:05 +05:30 committed by Carles Cufí
commit e5328b8931

View file

@ -123,7 +123,7 @@ static void eswifi_off_read_work(struct k_work *work)
goto done;
}
if (!net_pkt_write(pkt, data, len)) {
if (net_pkt_write(pkt, data, len) < 0) {
LOG_WRN("Incomplete buffer copy");
}