summaryrefslogtreecommitdiff
path: root/drivers/i2c
diff options
context:
space:
mode:
authorLaxman Dewangan <ldewangan@nvidia.com>2014-01-24 15:19:12 +0530
committerLaxman Dewangan <ldewangan@nvidia.com>2014-02-03 06:32:42 -0800
commit19498500ee5080541a17646b4c0da6b197d68803 (patch)
treec23354cf2096f5b4f13cc10f78fa3fba97cd19cb /drivers/i2c
parentea7dea3a2c63987b6fefccece2b638aa69a2b0a1 (diff)
mux: pca954x: fix compilation warnings
Fix compilation warning as /** i2c-mux-pca954x.c: In function 'pca954x_probe': i2c-mux-pca954x.c:225:6: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized] */ Change-Id: I876282732c6f2e607ff267130884b90ae3113e5a Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/359793 (cherry picked from commit d656b44485a273e002872402c5819ef5e201c3c0) Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Change-Id: Icf1e829930a108d50bab80428770b5ac8cbf27ce Reviewed-on: http://git-master/r/362838
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/muxes/i2c-mux-pca954x.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/i2c/muxes/i2c-mux-pca954x.c b/drivers/i2c/muxes/i2c-mux-pca954x.c
index b7941942c9e3..83cffc656949 100644
--- a/drivers/i2c/muxes/i2c-mux-pca954x.c
+++ b/drivers/i2c/muxes/i2c-mux-pca954x.c
@@ -277,8 +277,9 @@ static int pca954x_probe(struct i2c_client *client,
* that the mux is in fact present. This also
* initializes the mux to disconnected state.
*/
- if (i2c_smbus_write_byte(client, 0) < 0) {
- dev_warn(&client->dev, "probe failed\n");
+ ret = i2c_smbus_write_byte(client, 0);
+ if (ret < 0) {
+ dev_err(&client->dev, "Write to device failed: %d\n", ret);
goto exit_regulator_disable;
}