summaryrefslogtreecommitdiffstats
path: root/drivers/mfd/htc-i2cpld.c
diff options
context:
space:
mode:
authorLee Jones <lee.jones@linaro.org>2014-08-13 13:48:27 +0100
committerLee Jones <lee.jones@linaro.org>2014-09-26 08:15:29 +0100
commitfe4b7ea8e7c1f03601f6521c24898a688e565626 (patch)
treea91679e46e9ef3866ae584b8ee6354cb3bc8c18e /drivers/mfd/htc-i2cpld.c
parent6ae61fbf38d0cd2aa922eb5e7241e9b0bfd7009d (diff)
downloadop-kernel-dev-fe4b7ea8e7c1f03601f6521c24898a688e565626.zip
op-kernel-dev-fe4b7ea8e7c1f03601f6521c24898a688e565626.tar.gz
mfd: htc-i2cpld: container_of() cannot return NULL
Logically dead code (DEADCODE) dead_error_line: Execution cannot reach this statement: return; Remove the check for NULL. Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd/htc-i2cpld.c')
-rw-r--r--drivers/mfd/htc-i2cpld.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/mfd/htc-i2cpld.c b/drivers/mfd/htc-i2cpld.c
index b44f020..8e3ea07 100644
--- a/drivers/mfd/htc-i2cpld.c
+++ b/drivers/mfd/htc-i2cpld.c
@@ -227,13 +227,10 @@ static irqreturn_t htcpld_handler(int irq, void *dev)
static void htcpld_chip_set(struct gpio_chip *chip, unsigned offset, int val)
{
struct i2c_client *client;
- struct htcpld_chip *chip_data;
+ struct htcpld_chip *chip_data =
+ container_of(chip, struct htcpld_chip, chip_out);
unsigned long flags;
- chip_data = container_of(chip, struct htcpld_chip, chip_out);
- if (!chip_data)
- return;
-
client = chip_data->client;
if (client == NULL)
return;
OpenPOWER on IntegriCloud