Skip to contentSkip to conversation

Staging: dream: camera: sk5k3e2fx: fix code style issues

PATCH In review Chihau Chau 2 participants 2 messages Feb 26, 2010 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Staging: dream: camera: sk5k3e2fx: fix code style issues

From: Chihau Chau <[email protected]>

This fixes some code style issues about assignments in if conditions.

---
 drivers/staging/dream/camera/s5k3e2fx.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
drivers/staging/dream/camera/s5k3e2fx.c +4 -4
index edba198..2426f5e 100644
@@ -743,12 +743,12 @@ static int s5k3e2fx_sensor_open_init(const struct msm_camera_sensor_info *data)
 	}
 
 	/* initialize AF */
-	if ((rc = s5k3e2fx_i2c_write_b(s5k3e2fx_client->addr,
-			0x3146, 0x3A)) < 0)
+	rc = s5k3e2fx_i2c_write_b(s5k3e2fx_client->addr, 0x3146, 0x3A);
+	if (rc < 0)
 		goto init_fail1;
 
-	if ((rc = s5k3e2fx_i2c_write_b(s5k3e2fx_client->addr,
-			0x3130, 0x03)) < 0)
+	rc = s5k3e2fx_i2c_write_b(s5k3e2fx_client->addr, 0x3130, 0x03);
+	if (rc < 0)
 		goto init_fail1;
 
 	goto init_done;
Signature · 1 line
1.5.6.3
#1 lore raw
Quoted 5 lines

From: Chihau Chau <[email protected]>

This fixes some code style issues about assignments in if conditions.

ACK.

Quoted 25 lines
---
 drivers/staging/dream/camera/s5k3e2fx.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
drivers/staging/dream/camera/s5k3e2fx.c +4 -4
index edba198..2426f5e 100644
@@ -743,12 +743,12 @@ static int s5k3e2fx_sensor_open_init(const struct msm_camera_sensor_info *data)
 	}
 
 	/* initialize AF */
-	if ((rc = s5k3e2fx_i2c_write_b(s5k3e2fx_client->addr,
-			0x3146, 0x3A)) < 0)
+	rc = s5k3e2fx_i2c_write_b(s5k3e2fx_client->addr, 0x3146, 0x3A);
+	if (rc < 0)
 		goto init_fail1;
 
-	if ((rc = s5k3e2fx_i2c_write_b(s5k3e2fx_client->addr,
-			0x3130, 0x03)) < 0)
+	rc = s5k3e2fx_i2c_write_b(s5k3e2fx_client->addr, 0x3130, 0x03);
+	if (rc < 0)
 		goto init_fail1;
 
 	goto init_done;
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html