Skip to content

Commit 7723940

Browse files
ij-intelwsakernel
authored andcommitted
i2c: nforce2: Do PCI error check on own line
Instead of a if condition with a line split, use the usual error handling pattern with a separate variable to improve readability. No functional changes intended. Signed-off-by: Ilpo Järvinen <[email protected]> Reviewed-by: Andi Shyti <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
1 parent 1da18b3 commit 7723940

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/i2c/busses/i2c-nforce2.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,8 +327,8 @@ static int nforce2_probe_smb(struct pci_dev *dev, int bar, int alt_reg,
327327
/* Older incarnations of the device used non-standard BARs */
328328
u16 iobase;
329329

330-
if (pci_read_config_word(dev, alt_reg, &iobase)
331-
!= PCIBIOS_SUCCESSFUL) {
330+
error = pci_read_config_word(dev, alt_reg, &iobase);
331+
if (error != PCIBIOS_SUCCESSFUL) {
332332
dev_err(&dev->dev, "Error reading PCI config for %s\n",
333333
name);
334334
return -EIO;

0 commit comments

Comments
 (0)