diff mbox

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

Message ID CAPgLHd-02-tPeJghvYq+ZB9_MxdRKQ7Kvdqf2YdB=0wg9MoXow@mail.gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Wei Yongjun Nov. 11, 2013, 6:24 a.m. UTC
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

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>
---
 drivers/input/misc/mma8450.c | 2 ++
 1 file changed, 2 insertions(+)


--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Dmitry Torokhov Nov. 11, 2013, 7:37 a.m. UTC | #1
On Mon, Nov 11, 2013 at 02:24:20PM +0800, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> 
> 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>

Applied, thank you.

> ---
>  drivers/input/misc/mma8450.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/input/misc/mma8450.c b/drivers/input/misc/mma8450.c
> index f330969..92c43a1 100644
> --- a/drivers/input/misc/mma8450.c
> +++ b/drivers/input/misc/mma8450.c
> @@ -204,6 +204,8 @@ static int mma8450_probe(struct i2c_client *c,
>  		goto err_free_mem;
>  	}
>  
> +	i2c_set_clientdata(c, m);
> +
>  	return 0;
>  
>  err_free_mem:
>
diff mbox

Patch

diff --git a/drivers/input/misc/mma8450.c b/drivers/input/misc/mma8450.c
index f330969..92c43a1 100644
--- a/drivers/input/misc/mma8450.c
+++ b/drivers/input/misc/mma8450.c
@@ -204,6 +204,8 @@  static int mma8450_probe(struct i2c_client *c,
 		goto err_free_mem;
 	}
 
+	i2c_set_clientdata(c, m);
+
 	return 0;
 
 err_free_mem: