From: Lee Jones Date: Wed, 13 Aug 2014 12:52:27 +0000 (+0100) Subject: mfd: htc-i2cpld: Use '!variable' instead of 'variable == NULL' X-Git-Tag: v3.18-rc1~40^2~74 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=41cc08e955187b96867fa0f625c55496961699ba;p=karo-tx-linux.git mfd: htc-i2cpld: Use '!variable' instead of 'variable == NULL' This aids in consistency, as the rest of the checks in the file use this notation. Signed-off-by: Lee Jones --- diff --git a/drivers/mfd/htc-i2cpld.c b/drivers/mfd/htc-i2cpld.c index 8e3ea076568e..073e1801cdab 100644 --- a/drivers/mfd/htc-i2cpld.c +++ b/drivers/mfd/htc-i2cpld.c @@ -232,7 +232,7 @@ static void htcpld_chip_set(struct gpio_chip *chip, unsigned offset, int val) unsigned long flags; client = chip_data->client; - if (client == NULL) + if (!client) return; spin_lock_irqsave(&chip_data->lock, flags); @@ -373,7 +373,7 @@ static int htcpld_register_chip_i2c( plat_chip_data = &pdata->chip[chip_index]; adapter = i2c_get_adapter(pdata->i2c_adapter_id); - if (adapter == NULL) { + if (!adapter) { /* Eek, no such I2C adapter! Bail out. */ dev_warn(dev, "Chip at i2c address 0x%x: Invalid i2c adapter %d\n", plat_chip_data->addr, pdata->i2c_adapter_id);