Input: mma8450 - add missing i2c_set_clientdata() in mma8450_probe()

Add missing i2c_set_clientdata() in mma8450_probe(), otherwise
calling i2c_get_clientdata() in mma8450_remove() returns NULL.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
This commit is contained in:
Wei Yongjun 2013-11-10 23:35:45 -08:00 committed by Dmitry Torokhov
parent 158baef351
commit acc84667c5
1 changed files with 3 additions and 1 deletions

View File

@ -204,6 +204,8 @@ static int mma8450_probe(struct i2c_client *c,
goto err_free_mem; goto err_free_mem;
} }
i2c_set_clientdata(c, m);
return 0; return 0;
err_free_mem: err_free_mem: