]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
media: Hexium Orion: Adjust one function call together with a variable assignment
authorMarkus Elfring <elfring@users.sourceforge.net>
Sun, 3 Sep 2017 18:12:36 +0000 (14:12 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Sat, 23 Sep 2017 12:31:39 +0000 (08:31 -0400)
The script "checkpatch.pl" pointed information out like the following.

ERROR: do not use assignment in if condition

Thus fix the affected source code place.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/pci/saa7146/hexium_orion.c

index 7dc182202f8b27223c15784f2d0f155f15d8070f..043318aa19e2e82f5878786903d4f88ead3ad3d4 100644 (file)
@@ -266,7 +266,9 @@ static int hexium_probe(struct saa7146_dev *dev)
 
        /* check if this is an old hexium Orion card by looking at
           a saa7110 at address 0x4e */
-       if (0 == (err = i2c_smbus_xfer(&hexium->i2c_adapter, 0x4e, 0, I2C_SMBUS_READ, 0x00, I2C_SMBUS_BYTE_DATA, &data))) {
+       err = i2c_smbus_xfer(&hexium->i2c_adapter, 0x4e, 0, I2C_SMBUS_READ,
+                            0x00, I2C_SMBUS_BYTE_DATA, &data);
+       if (err == 0) {
                pr_info("device is a Hexium HV-PCI6/Orion (old)\n");
                /* we store the pointer in our private data field */
                dev->ext_priv = hexium;