summaryrefslogtreecommitdiff
path: root/include/linux/can
diff options
context:
space:
mode:
authorMarc Kleine-Budde <mkl@pengutronix.de>2020-09-16 00:35:01 +0200
committerMarc Kleine-Budde <mkl@pengutronix.de>2020-09-21 10:13:16 +0200
commit80a71815d8cd1be6481ad16fad3167f095045a06 (patch)
treeaa6aab3cedaf7badf758ff83064715ab4d8f7fc0 /include/linux/can
parent87245f1f1183083b219eaa72861889dba84d128b (diff)
can: dev: can_put_echo_skb(): propagate error in case of errors
The function can_put_echo_skb() can fail for several reasons. It may fail due to OOM, but when it fails it's usually due to locking problems in the driver. In order to help developing and debugging of new drivers propagate error value in case of errors. Link: https://lore.kernel.org/r/20200915223527.1417033-12-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'include/linux/can')
-rw-r--r--include/linux/can/dev.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/can/dev.h b/include/linux/can/dev.h
index 516892566ac9..ed0482b2f4b2 100644
--- a/include/linux/can/dev.h
+++ b/include/linux/can/dev.h
@@ -201,8 +201,8 @@ void can_bus_off(struct net_device *dev);
void can_change_state(struct net_device *dev, struct can_frame *cf,
enum can_state tx_state, enum can_state rx_state);
-void can_put_echo_skb(struct sk_buff *skb, struct net_device *dev,
- unsigned int idx);
+int can_put_echo_skb(struct sk_buff *skb, struct net_device *dev,
+ unsigned int idx);
struct sk_buff *__can_get_echo_skb(struct net_device *dev, unsigned int idx,
u8 *len_ptr);
unsigned int can_get_echo_skb(struct net_device *dev, unsigned int idx);