Skip to content
Commit d763ab30 authored by Marc Kleine-Budde's avatar Marc Kleine-Budde
Browse files

can: rx-offload: can_rx_offload_offload_one(): use ERR_PTR() to propagate...


can: rx-offload: can_rx_offload_offload_one(): use ERR_PTR() to propagate error value in case of errors

Before this patch can_rx_offload_offload_one() returns a pointer to a
skb containing the read CAN frame or a NULL pointer.

However the meaning of the NULL pointer is ambiguous, it can either mean
the requested mailbox is empty or there was an error.

This patch fixes this situation by returning:
- pointer to skb on success
- NULL pointer if mailbox is empty
- ERR_PTR() in case of an error

All users of can_rx_offload_offload_one() have been adopted, no
functional change intended.

Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
parent 4e9016be
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment