All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH hwmon-next] hwmon: (pmbus/tps25990) Remove unnecessary call
@ 2024-12-06  6:28 Dheeraj Reddy Jonnalagadda
  2024-12-06  7:57 ` Guenter Roeck
  0 siblings, 1 reply; 2+ messages in thread
From: Dheeraj Reddy Jonnalagadda @ 2024-12-06  6:28 UTC (permalink / raw)
  To: jbrunet, linux-hwmon
  Cc: jdelvare, linux, linux-kernel, Dheeraj Reddy Jonnalagadda

This commit addresses a structurally dead code issue detected by
Coverity (CID 1602227). An integer is returned early in one of the
switch cases causing the later statements to never be called. The
return statement is removed following convention in the other switch
cases.

Signed-off-by: Dheeraj Reddy Jonnalagadda <dheeraj.linuxdev@gmail.com>
---
 drivers/hwmon/pmbus/tps25990.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/hwmon/pmbus/tps25990.c b/drivers/hwmon/pmbus/tps25990.c
index cc0f5c7cecb0..0d2655e69549 100644
--- a/drivers/hwmon/pmbus/tps25990.c
+++ b/drivers/hwmon/pmbus/tps25990.c
@@ -130,7 +130,6 @@ static int tps25990_read_word_data(struct i2c_client *client,
 		break;
 
 	case PMBUS_VIRT_READ_IIN_MAX:
-		return TPS25990_READ_IIN_PEAK;
 		ret = pmbus_read_word_data(client, page, phase,
 					   TPS25990_READ_IIN_PEAK);
 		break;
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH hwmon-next] hwmon: (pmbus/tps25990) Remove unnecessary call
  2024-12-06  6:28 [PATCH hwmon-next] hwmon: (pmbus/tps25990) Remove unnecessary call Dheeraj Reddy Jonnalagadda
@ 2024-12-06  7:57 ` Guenter Roeck
  0 siblings, 0 replies; 2+ messages in thread
From: Guenter Roeck @ 2024-12-06  7:57 UTC (permalink / raw)
  To: Dheeraj Reddy Jonnalagadda, jbrunet, linux-hwmon; +Cc: jdelvare, linux-kernel

Hi,

On 12/5/24 22:28, Dheeraj Reddy Jonnalagadda wrote:
> This commit addresses a structurally dead code issue detected by
> Coverity (CID 1602227). An integer is returned early in one of the
> switch cases causing the later statements to never be called. The
> return statement is removed following convention in the other switch
> cases.
> 
> Signed-off-by: Dheeraj Reddy Jonnalagadda <dheeraj.linuxdev@gmail.com>

This has already been fixed.

Thanks,
Guenter

> ---
>   drivers/hwmon/pmbus/tps25990.c | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/hwmon/pmbus/tps25990.c b/drivers/hwmon/pmbus/tps25990.c
> index cc0f5c7cecb0..0d2655e69549 100644
> --- a/drivers/hwmon/pmbus/tps25990.c
> +++ b/drivers/hwmon/pmbus/tps25990.c
> @@ -130,7 +130,6 @@ static int tps25990_read_word_data(struct i2c_client *client,
>   		break;
>   
>   	case PMBUS_VIRT_READ_IIN_MAX:
> -		return TPS25990_READ_IIN_PEAK;
>   		ret = pmbus_read_word_data(client, page, phase,
>   					   TPS25990_READ_IIN_PEAK);
>   		break;


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-12-06  7:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-06  6:28 [PATCH hwmon-next] hwmon: (pmbus/tps25990) Remove unnecessary call Dheeraj Reddy Jonnalagadda
2024-12-06  7:57 ` Guenter Roeck

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.