Skip to content

Commit

Permalink
media: atomisp: Deduplicate return ret in gmin_i2c_write()
Browse files Browse the repository at this point in the history
Deduplicate return ret in gmin_i2c_write().

While here, replace 'Kernel' by 'kernel' in the message and
reduce amount of LOCs.

Signed-off-by: Andy Shevchenko <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
  • Loading branch information
andy-shev authored and mchehab committed Jul 18, 2020
1 parent 2e31e6f commit e4fb745
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -413,16 +413,12 @@ static int gmin_i2c_write(struct device *dev, u16 i2c_addr, u8 reg,
"I2C write, addr: 0x%02x, reg: 0x%02x, value: 0x%02x, mask: 0x%02x\n",
i2c_addr, reg, value, mask);

ret = intel_soc_pmic_exec_mipi_pmic_seq_element(i2c_addr, reg,
value, mask);

if (ret == -EOPNOTSUPP) {
ret = intel_soc_pmic_exec_mipi_pmic_seq_element(i2c_addr, reg, value, mask);
if (ret == -EOPNOTSUPP)
dev_err(dev,
"ACPI didn't mapped the OpRegion needed to access I2C address 0x%02x.\n"
"Need to compile the Kernel using CONFIG_*_PMIC_OPREGION settings\n",
"Need to compile the kernel using CONFIG_*_PMIC_OPREGION settings\n",
i2c_addr);
return ret;
}

return ret;
}
Expand Down

0 comments on commit e4fb745

Please sign in to comment.