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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Aug 2019 06:28:30 +0000 (08:28 +0200)
commit3257103502cf8c74d4979e96445d7409a0e7cd68
tree470f425fefdca4e3391da205c7071d2f8c853f13
parentdbf790dcb8a9d7beb57f14004e0bba8235d833b8
can: mcp251x: add error check when wq alloc failed

[ Upstream commit 375f755899b8fc21196197e02aab26257df26e85 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/can/spi/mcp251x.c