diff --git a/drivers/802.15.4/cc2520.c b/drivers/802.15.4/cc2520.c index a030be8b958..ad7858a58b0 100644 --- a/drivers/802.15.4/cc2520.c +++ b/drivers/802.15.4/cc2520.c @@ -841,7 +841,7 @@ static int cc2520_read(void *buf, unsigned short bufsize) } if (!cc2520_pending_packet()) { - return 0; + return -EAGAIN; } cc2520_packets_read++; @@ -893,7 +893,7 @@ error: print_errors(); flushrx(); - return 0; + return -EINVAL; } static void read_packet(void)