Skip to content

Commit e4fb745

Browse files
andy-shevmchehab
authored andcommitted
media: atomisp: Deduplicate return ret in gmin_i2c_write()
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]>
1 parent 2e31e6f commit e4fb745

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -413,16 +413,12 @@ static int gmin_i2c_write(struct device *dev, u16 i2c_addr, u8 reg,
413413
"I2C write, addr: 0x%02x, reg: 0x%02x, value: 0x%02x, mask: 0x%02x\n",
414414
i2c_addr, reg, value, mask);
415415

416-
ret = intel_soc_pmic_exec_mipi_pmic_seq_element(i2c_addr, reg,
417-
value, mask);
418-
419-
if (ret == -EOPNOTSUPP) {
416+
ret = intel_soc_pmic_exec_mipi_pmic_seq_element(i2c_addr, reg, value, mask);
417+
if (ret == -EOPNOTSUPP)
420418
dev_err(dev,
421419
"ACPI didn't mapped the OpRegion needed to access I2C address 0x%02x.\n"
422-
"Need to compile the Kernel using CONFIG_*_PMIC_OPREGION settings\n",
420+
"Need to compile the kernel using CONFIG_*_PMIC_OPREGION settings\n",
423421
i2c_addr);
424-
return ret;
425-
}
426422

427423
return ret;
428424
}

0 commit comments

Comments
 (0)