Re: [PATCH 3/4] net: ch9200: improve error handling in get_mac_address()
From: Simon Horman
Date: Thu Mar 20 2025 - 09:51:24 EST
On Wed, Mar 19, 2025 at 11:21:55AM +0000, Qasim Ijaz wrote:
> The get_mac_address() function has an issue where it does not
> directly check the return value of each control_read(), instead
> it sums up the return values and checks them all at the end
> which means if any call to control_read() fails the function just
> continues on.
>
> Handle this by validating the return value of each call and fail fast
> and early instead of continuing.
>
> Fixes: 4a476bd6d1d9 ("usbnet: New driver for QinHeng CH9200 devices")
> Signed-off-by: Qasim Ijaz <qasdev00@xxxxxxxxx>
Reviewed-by: Simon Horman <horms@xxxxxxxxxx>