summaryrefslogtreecommitdiff
path: root/drivers/platform
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2020-03-26 16:05:56 +0200
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>2020-03-28 22:37:29 +0200
commit48978995950b2ebbebdc47623fe55c75f1633e40 (patch)
treee90ada6e1886a7aa20d20c5cb6a4cc30858136ab /drivers/platform
parent74bef188eac103ecfeaf9cd48b86e12f2a2492af (diff)
platform/x86: surface3_power: Simplify mshw0011_adp_psr() to one liner
Refactor mshw0011_adp_psr() to be one liner. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/surface3_power.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/platform/x86/surface3_power.c b/drivers/platform/x86/surface3_power.c
index 3eb1b48c562e..4229e64a84e8 100644
--- a/drivers/platform/x86/surface3_power.c
+++ b/drivers/platform/x86/surface3_power.c
@@ -295,14 +295,7 @@ static int mshw0011_bst(struct mshw0011_data *cdata, struct bst *bst)
static int mshw0011_adp_psr(struct mshw0011_data *cdata)
{
- struct i2c_client *client = cdata->adp1;
- int ret;
-
- ret = i2c_smbus_read_byte_data(client, MSHW0011_ADP1_REG_PSR);
- if (ret < 0)
- return ret;
-
- return ret;
+ return i2c_smbus_read_byte_data(cdata->adp1, MSHW0011_ADP1_REG_PSR);
}
static int mshw0011_isr(struct mshw0011_data *cdata)