Skip to content

Commit 73aefba

Browse files
author
Paolo Abeni
committed
Merge tag 'linux-can-fixes-for-7.0-20260310' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can
Marc Kleine-Budde says: ==================== pull-request: can 2026-03-10 this is a pull request of 2 patches for net/main. Haibo Chen's patch fixes the maximum allowed bit rate error, which was broken in v6.19. Wenyuan Li contributes a patch for the hi311x driver that adds missing error checking in the caller of the hi3110_power_enable() function, hi3110_open(). linux-can-fixes-for-7.0-20260310 * tag 'linux-can-fixes-for-7.0-20260310' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can: can: hi311x: hi3110_open(): add check for hi3110_power_enable() return value can: dev: keep the max bitrate error at 5% ==================== Link: https://patch.msgid.link/20260310103547.2299403-1-mkl@pengutronix.de Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2 parents 6f1a914 + 47bba09 commit 73aefba

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

drivers/net/can/dev/calc_bittiming.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#include <linux/units.h>
99
#include <linux/can/dev.h>
1010

11-
#define CAN_CALC_MAX_ERROR 50 /* in one-tenth of a percent */
11+
#define CAN_CALC_MAX_ERROR 500 /* max error 5% */
1212

1313
/* CiA recommended sample points for Non Return to Zero encoding. */
1414
static int can_calc_sample_point_nrz(const struct can_bittiming *bt)

drivers/net/can/spi/hi311x.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -755,7 +755,9 @@ static int hi3110_open(struct net_device *net)
755755
return ret;
756756

757757
mutex_lock(&priv->hi3110_lock);
758-
hi3110_power_enable(priv->transceiver, 1);
758+
ret = hi3110_power_enable(priv->transceiver, 1);
759+
if (ret)
760+
goto out_close_candev;
759761

760762
priv->force_quit = 0;
761763
priv->tx_skb = NULL;
@@ -790,6 +792,7 @@ static int hi3110_open(struct net_device *net)
790792
hi3110_hw_sleep(spi);
791793
out_close:
792794
hi3110_power_enable(priv->transceiver, 0);
795+
out_close_candev:
793796
close_candev(net);
794797
mutex_unlock(&priv->hi3110_lock);
795798
return ret;

0 commit comments

Comments
 (0)