Re: [PATCH] mailbox: check ->last_tx_done for NULL in case of timer-based polling

From: Sudeep Holla
Date: Tue Mar 21 2017 - 13:03:29 EST




On 21/03/17 16:57, Alexey Klimov wrote:
> It is allowed by code to register mailbox controller that sets txdone_poll
> flag to request timer-based polling with missed ->last_tx_done() method.
> If such thing happens and since presence of last_tx_done() is not checked
> it will fail in hrtimer callback function txdone_hrtimer() when first
> message will be transmitted.
>
> This patch adds check for this method and logging of error on
> registration of mailbox controller if it requested timer-based polling.
>

Good to have check.

Acked-by: Sudeep Holla <sudeep.holla@xxxxxxx>

--
Regards,
Sudeep