]> git.baikalelectronics.ru Git - kernel.git/commit
can: mcp251xfd: mcp251xfd_probe(): bail out if no IRQ was given
authorMarc Kleine-Budde <mkl@pengutronix.de>
Sat, 21 Nov 2020 19:14:19 +0000 (20:14 +0100)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Thu, 26 Nov 2020 10:50:32 +0000 (11:50 +0100)
commit1a1c436bad340cea1cff815dd2cbb2c4f6af8d43
treec3defd66688f6f69cdc6cad75d55fd0cd2e7d085
parent4ba1cb39fce4464151517a37ce0ac0a1a3f580d6
can: mcp251xfd: mcp251xfd_probe(): bail out if no IRQ was given

This patch add a check to the mcp251xfd_probe() function to bail out and give
the user a proper error message if no IRQ is specified. Otherwise the driver
will probe just fine but ifup will fail with a meaningless "RTNETLINK answers:
Invalid argument" error message.

Link: https://lore.kernel.org/r/20201123113522.3820052-1-mkl@pengutronix.de
Reported-by: Niels Petter <petter@ka-long.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c