• Marc Kleine-Budde's avatar
    can: rx-offload: can_rx_offload_offload_one(): use ERR_PTR() to propagate... · d763ab30
    Marc Kleine-Budde authored
    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>
    d763ab30
rx-offload.c 9.62 KB