[PATCH] mfd: 88pm860x-core: Remove unneeded variable:"ret"

From: angkery
Date: Tue Jun 15 2021 - 09:28:34 EST


From: Junlin Yang <yangjunlin@xxxxxxxxxx>

The variable "ret" is initialized to -EIO and then returned.
So remove the "ret" variable and return -EIO.

Signed-off-by: Junlin Yang <yangjunlin@xxxxxxxxxx>
---
drivers/mfd/88pm860x-core.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/drivers/mfd/88pm860x-core.c b/drivers/mfd/88pm860x-core.c
index b1e829e..1e69279 100644
--- a/drivers/mfd/88pm860x-core.c
+++ b/drivers/mfd/88pm860x-core.c
@@ -651,7 +651,6 @@ static void device_irq_exit(struct pm860x_chip *chip)

int pm8606_osc_enable(struct pm860x_chip *chip, unsigned short client)
{
- int ret = -EIO;
struct i2c_client *i2c = (chip->id == CHIP_PM8606) ?
chip->client : chip->companion;

@@ -680,19 +679,18 @@ int pm8606_osc_enable(struct pm860x_chip *chip, unsigned short client)
}
mutex_unlock(&chip->osc_lock);

- dev_dbg(chip->dev, "%s(A): vote=0x%x status=%d ret=%d\n",
+ dev_dbg(chip->dev, "%s(A): vote=0x%x status=%d\n",
__func__, chip->osc_vote,
- chip->osc_status, ret);
+ chip->osc_status);
return 0;
out:
mutex_unlock(&chip->osc_lock);
- return ret;
+ return -EIO;
}
EXPORT_SYMBOL(pm8606_osc_enable);

int pm8606_osc_disable(struct pm860x_chip *chip, unsigned short client)
{
- int ret = -EIO;
struct i2c_client *i2c = (chip->id == CHIP_PM8606) ?
chip->client : chip->companion;

@@ -721,13 +719,13 @@ int pm8606_osc_disable(struct pm860x_chip *chip, unsigned short client)
}
mutex_unlock(&chip->osc_lock);

- dev_dbg(chip->dev, "%s(A): vote=0x%x status=%d ret=%d\n",
+ dev_dbg(chip->dev, "%s(A): vote=0x%x status=%d\n",
__func__, chip->osc_vote,
- chip->osc_status, ret);
+ chip->osc_status);
return 0;
out:
mutex_unlock(&chip->osc_lock);
- return ret;
+ return -EIO;
}
EXPORT_SYMBOL(pm8606_osc_disable);

--
1.9.1