From: Stefan Agner Date: Mon, 18 May 2015 16:33:27 +0000 (+0200) Subject: can: mcp251x: fix resume when device is down X-Git-Tag: omap-for-v4.3/fixes-merge-window~206^2~20^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=25b401c1816ae64bcc5dcb1d39ab41812522a0ce;p=pandora-kernel.git can: mcp251x: fix resume when device is down If a valid power regulator or a dummy regulator is used (which happens to be the case when no regulator is specified), restart_work is queued no matter whether the device was running or not at suspend time. Since work queues get initialized in the ndo_open callback, resuming leads to a NULL pointer exception. Reverse exactly the steps executed at suspend time: - Enable the power regulator in any case - Enable the transceiver regulator if the device was running, even in case we have a power regulator - Queue restart_work only in case the device was running Fixes: bf66f3736a94 ("can: mcp251x: Move to threaded interrupts instead of workqueues.") Signed-off-by: Stefan Agner Cc: linux-stable Signed-off-by: Marc Kleine-Budde --- Reading git-diff-tree failed