Re: [PATCH] can: m_can: Fix suspend deinit() error path
From: Markus Schneider-Pargmann
Date: Tue Sep 29 2026 - 04:26:58 EST
On Fri Sep 18, 2026 at 9:21 PM CEST, Kendall Willis wrote:
> On 10:29-20260918, Markus Schneider-Pargmann (TI) wrote:
>> When suspending mcan, deinit is called and its return value is returned,
>> but nothing is restored. Returning an error in the suspend function will
>> stop suspending and resume the system immediately. So on error the
>> device should be restored to its previous state.
>>
>> Fixes: ad1ddb3bfb0c ("can: m_can: call deinit/init callback when going into suspend/resume")
>> Signed-off-by: Markus Schneider-Pargmann (TI) <msp@xxxxxxxxxxxx>
>> ---
>
> Separate from this commit, but does cdev->can.state in
> m_can_class_resume need to be moved to outside the cdev->pm_wake_source
> conditional since in the suspend path it is only in the
> netif_running(ndev) conditional?
Thanks for the review and pointing this out. But m_can_start() in the
else case sets cdev->can.state as well. So I think it should be fine.
Best
Markus
Attachment:
signature.asc
Description: PGP signature