]> asedeno.scripts.mit.edu Git - linux.git/commit
mfd: bxtwc: Remove unnecessary i2c_addr checks in ipc calls
authorKuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Thu, 30 Mar 2017 23:35:40 +0000 (16:35 -0700)
committerLee Jones <lee.jones@linaro.org>
Thu, 27 Apr 2017 08:25:06 +0000 (09:25 +0100)
commitb4ccc4d2e82f7c7f8304f44544bdefcd16234582
tree419a6bc08090eb8023b16602a6bee57272adead0
parent4407319d8fff93308c2afe40e7c2a7dc564ec122
mfd: bxtwc: Remove unnecessary i2c_addr checks in ipc calls

In the following code block, BXTWC_DEVICE1_ADDR value is
already fixed and hence there no need to check for
if (!i2c_addr) in every ipc read/write calls. Even if this
check is required it can be moved to probe function.

i2c_addr = BXTWC_DEVICE1_ADDR;
if (!i2c_addr) {
dev_err(pmic->dev, "I2C address not set\n");
return -EINVAL;
}

This patch remove this extra check and adds some NULL
parameter checks.

Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/intel_soc_pmic_bxtwc.c