Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

media: Hexium Orion: Adjust one function call together with a variable assignment

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>

authored by

Markus Elfring and committed by
Mauro Carvalho Chehab
5f4d3469 84c62fb9

+3 -1
+3 -1
drivers/media/pci/saa7146/hexium_orion.c
··· 266 266 267 267 /* check if this is an old hexium Orion card by looking at 268 268 a saa7110 at address 0x4e */ 269 - if (0 == (err = i2c_smbus_xfer(&hexium->i2c_adapter, 0x4e, 0, I2C_SMBUS_READ, 0x00, I2C_SMBUS_BYTE_DATA, &data))) { 269 + err = i2c_smbus_xfer(&hexium->i2c_adapter, 0x4e, 0, I2C_SMBUS_READ, 270 + 0x00, I2C_SMBUS_BYTE_DATA, &data); 271 + if (err == 0) { 270 272 pr_info("device is a Hexium HV-PCI6/Orion (old)\n"); 271 273 /* we store the pointer in our private data field */ 272 274 dev->ext_priv = hexium;