<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body style='font-size: 12pt; font-family: Verdana,Geneva,sans-serif'>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">Assignments in if condition are less readable and error-prone. Fixes<br />also checkpatch warning:<br /><br />ERROR: do not use assignment in if condition<br /><br />Signed-off-by: Ran Sun <sunran001@208suo.com><br />---<br /> drivers/gpu/drm/nouveau/nvkm/subdev/i2c/base.c | 3 ++-<br /> 1 file changed, 2 insertions(+), 1 deletion(-)<br /><br />diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/base.c<br />index 976539de4220..054fa42f1d04 100644<br />--- a/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/base.c<br />+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/base.c<br />@@ -286,7 +286,8 @@ nvkm_i2c_new_(const struct nvkm_i2c_func *func, struct nvkm_device *device,<br /> <br /> if (ccbE.share != DCB_I2C_UNUSED) {<br /> const int id = NVKM_I2C_PAD_HYBRID(ccbE.share);<br />- if (!(pad = nvkm_i2c_pad_find(i2c, id)))<br />+ pad = nvkm_i2c_pad_find(i2c, id);<br />+ if (!pad)<br /> ret = func->pad_s_new(i2c, id, &pad);<br /> else<br /> ret = 0;</div>
</body></html>