From: Ilpo Järvinen Date: Thu, 24 Aug 2023 13:28:26 +0000 (+0300) Subject: i2c: nforce2: Do PCI error check on own line X-Git-Tag: v6.6.7~1981^2~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7723940360fd7716bae0e11dc266ff427730e593;p=platform%2Fkernel%2Flinux-starfive.git 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 Reviewed-by: Andi Shyti Signed-off-by: Wolfram Sang --- diff --git a/drivers/i2c/busses/i2c-nforce2.c b/drivers/i2c/busses/i2c-nforce2.c index 7772783..38d203d 100644 --- a/drivers/i2c/busses/i2c-nforce2.c +++ b/drivers/i2c/busses/i2c-nforce2.c @@ -327,8 +327,8 @@ static int nforce2_probe_smb(struct pci_dev *dev, int bar, int alt_reg, /* Older incarnations of the device used non-standard BARs */ u16 iobase; - if (pci_read_config_word(dev, alt_reg, &iobase) - != PCIBIOS_SUCCESSFUL) { + error = pci_read_config_word(dev, alt_reg, &iobase); + if (error != PCIBIOS_SUCCESSFUL) { dev_err(&dev->dev, "Error reading PCI config for %s\n", name); return -EIO;