can: bcm: check the result of can_send() in bcm_can_tx()
authorZiyang Xuan <william.xuanziyang@huawei.com>
Thu, 15 Sep 2022 01:55:56 +0000 (09:55 +0800)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Fri, 23 Sep 2022 11:53:10 +0000 (13:53 +0200)
commit3fd7bfd28cfd68ae80a2fe92ea1615722cc2ee6e
treebb8251b46c8468d34998736640fecb921f855d8b
parentedd1a7e42f1d2d09c5f79ecef05ae19dc669bf34
can: bcm: check the result of can_send() in bcm_can_tx()

If can_send() fail, it should not update frames_abs counter
in bcm_can_tx(). Add the result check for can_send() in bcm_can_tx().

Suggested-by: Marc Kleine-Budde <mkl@pengutronix.de>
Suggested-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Ziyang Xuan <william.xuanziyang@huawei.com>
Link: https://lore.kernel.org/all/9851878e74d6d37aee2f1ee76d68361a46f89458.1663206163.git.william.xuanziyang@huawei.com
Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
net/can/bcm.c