]> 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)
commitc2d41c761e04f1c971817ec4289f03c1b4102c5d
treec3defd66688f6f69cdc6cad75d55fd0cd2e7d085
parent1b1b2a2ca090f897d8b0a8c9043eddc5ed46e8b3
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