]> git.baikalelectronics.ru Git - kernel.git/commit
can: mcp251xfd: mcp251xfd_probe(): fix an error pointer dereference in probe
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 3 May 2021 14:49:09 +0000 (17:49 +0300)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Thu, 6 May 2021 07:24:06 +0000 (09:24 +0200)
commitb415471691f157ac7cffac58b12bb59173f0cee0
tree65a3b72d313c913bcc36fb8ef426d8492ad11021
parentf3074cf0edd2cf836128149ad867c305d7a2f543
can: mcp251xfd: mcp251xfd_probe(): fix an error pointer dereference in probe

When we converted this code to use dev_err_probe() we accidentally
removed a return. It means that if devm_clk_get() it will lead to an
Oops when we call clk_get_rate() on the next line.

Fixes: ceef931aea1f ("can: mcp251xfd: mcp251xfd_probe(): use dev_err_probe() to simplify error handling")
Link: https://lore.kernel.org/r/YJANZf13Qxd5Mhr1@mwanda
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Manivannan Sadhasivam <mani@kernel.org>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c