]> git.baikalelectronics.ru Git - kernel.git/commit
can: xilinx_can: xcan_probe(): check for error irq
authorJiasheng Jiang <jiasheng@iscas.ac.cn>
Fri, 24 Dec 2021 02:13:24 +0000 (10:13 +0800)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Sun, 9 Jan 2022 12:32:28 +0000 (13:32 +0100)
commit7cfeec89a0e4e9ab8893960ef2aa7fa89012ae9a
treeab76e17189fe923fc531c10488ddd4759952b419
parentbd46222ca9b2da620495215958fe7ca75547c4dc
can: xilinx_can: xcan_probe(): check for error irq

For the possible failure of the platform_get_irq(), the returned irq
could be error number and will finally cause the failure of the
request_irq().

Consider that platform_get_irq() can now in certain cases return
-EPROBE_DEFER, and the consequences of letting request_irq()
effectively convert that into -EINVAL, even at probe time rather than
later on. So it might be better to check just now.

Fixes: 7b2a5faf4fb9 ("can: xilinx CAN controller support")
Link: https://lore.kernel.org/all/20211224021324.1447494-1-jiasheng@iscas.ac.cn
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/xilinx_can.c