can: mcp251x: add error check when wq alloc failed
authorWeitao Hou <houweitaoo@gmail.com>
Tue, 25 Jun 2019 12:50:48 +0000 (20:50 +0800)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Wed, 24 Jul 2019 09:10:15 +0000 (11:10 +0200)
commit375f755899b8fc21196197e02aab26257df26e85
tree92b0c0d9f4fc392989a6dbda49be98b7372b2a96
parentd4b890aec4bea7334ca2ca56fd3b12fb48a00cd1
can: mcp251x: add error check when wq alloc failed

add error check when workqueue alloc failed, and remove redundant code
to make it clear.

Fixes: e0000163e30e ("can: Driver for the Microchip MCP251x SPI CAN controllers")
Signed-off-by: Weitao Hou <houweitaoo@gmail.com>
Acked-by: Willem de Bruijn <willemb@google.com>
Tested-by: Sean Nyekjaer <sean@geanix.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/spi/mcp251x.c