Re: [PATCH] hwmon: tps25990: Fix unreachable code in tps25990_read_word_data
From: Guenter Roeck
Date: Thu Dec 05 2024 - 19:15:58 EST
On Thu, Dec 05, 2024 at 10:33:15PM +0100, Karol Przybylski wrote:
> The tps25990_read_word_data function contains a block of unreachable code caused by the syntactic structure in the PMBUS_VIRT_READ_IIN_MAX case.
>
> Specifically, the return TPS25990_READ_IIN_PEAK; statement immediately exits the function, making the next lines unreachable.
>
> This patch removes the return statement, leaving the expected handling.
>
> Discovered in coverity: CID 1602227
>
> Signed-off-by: Karol Przybylski <karprzy7@xxxxxxxxx>
Thanks a log for the patch. I squashed it into the patch introducing the
problem. Please note that the above commit message is missing line breaks.
Thanks,
Guenter