* [PATCH] mfd: 88pm860x-core: Remove unneeded variable:"ret"
@ 2021-06-15 13:26 angkery
0 siblings, 0 replies; only message in thread
From: angkery @ 2021-06-15 13:26 UTC (permalink / raw)
To: lee.jones; +Cc: linux-kernel, Junlin Yang
From: Junlin Yang <yangjunlin@yulong.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@yulong.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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-06-15 13:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-15 13:26 [PATCH] mfd: 88pm860x-core: Remove unneeded variable:"ret" angkery
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).