Re: [PATCH v2] can: etas_es58x: fix error handling

From: Pavel Skripkin
Date: Mon Nov 15 2021 - 04:27:39 EST


On 11/15/21 12:24, Vincent MAILHOL wrote:
Sure! I should have check it before sending v2 :( My bad, sorry. I see
now, that there is possible calltrace which can hit NULL defer.

I should be the one apologizing here. Sorry for the confusion.

One thing I am wondering about is why in some code parts there are
validation checks for es58x_dev->netdev[i] and in others they are missing.

There is a validation when it is accessed in a for loop.
It is not guarded in es58x_send_msg() because this function
expects the channel_idx to be a valid index.

Does this answer your wonders?


Yeah! I have just looked at the code one more time and came up with the same idea.

Thank you for confirming and acking my patch :)



With regards,
Pavel Skripkin