[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20210615132626.1386-1-angkery@163.com>
Date: Tue, 15 Jun 2021 21:26:26 +0800
From: angkery <angkery@....com>
To: lee.jones@...aro.org
Cc: linux-kernel@...r.kernel.org, Junlin Yang <yangjunlin@...ong.com>
Subject: [PATCH] mfd: 88pm860x-core: Remove unneeded variable:"ret"
From: Junlin Yang <yangjunlin@...ong.com>
The variable "ret" is initialized to -EIO and then returned.
So remove the "ret" variable and return -EIO.
Signed-off-by: Junlin Yang <yangjunlin@...ong.com>
---
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
Powered by blists - more mailing lists