1
0
Fork 0

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>
hifive-unleashed-5.1
Lee Jones 2014-08-13 13:48:27 +01:00
parent 6ae61fbf38
commit fe4b7ea8e7
1 changed files with 2 additions and 5 deletions

View File

@ -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;