diff mbox

[2/2] Input: eeti_ts - Remove redundant null check

Message ID 1364457222-4381-2-git-send-email-sachin.kamat@linaro.org (mailing list archive)
State New, archived
Headers show

Commit Message

Sachin Kamat March 28, 2013, 7:53 a.m. UTC
'pdata' is already dereferenced earlier. Hence this check is
meaningless.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 drivers/input/touchscreen/eeti_ts.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

Comments

Dmitry Torokhov March 31, 2013, 7:26 a.m. UTC | #1
On Thu, Mar 28, 2013 at 01:23:42PM +0530, Sachin Kamat wrote:
> 'pdata' is already dereferenced earlier. Hence this check is
> meaningless.
> 
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> ---
>  drivers/input/touchscreen/eeti_ts.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/input/touchscreen/eeti_ts.c b/drivers/input/touchscreen/eeti_ts.c
> index 55255a9..8fe5086 100644
> --- a/drivers/input/touchscreen/eeti_ts.c
> +++ b/drivers/input/touchscreen/eeti_ts.c
> @@ -206,8 +206,7 @@ static int eeti_ts_probe(struct i2c_client *client,
>  	if (err < 0)
>  		goto err1;
>  
> -	if (pdata)
> -		priv->irq_active_high = pdata->irq_active_high;
> +	priv->irq_active_high = pdata->irq_active_high;
>  
>  	irq_flags = priv->irq_active_high ?
>  		IRQF_TRIGGER_RISING : IRQF_TRIGGER_FALLING;
> -- 
> 1.7.4.1
> 

Applied both, thank you Sachin.
diff mbox

Patch

diff --git a/drivers/input/touchscreen/eeti_ts.c b/drivers/input/touchscreen/eeti_ts.c
index 55255a9..8fe5086 100644
--- a/drivers/input/touchscreen/eeti_ts.c
+++ b/drivers/input/touchscreen/eeti_ts.c
@@ -206,8 +206,7 @@  static int eeti_ts_probe(struct i2c_client *client,
 	if (err < 0)
 		goto err1;
 
-	if (pdata)
-		priv->irq_active_high = pdata->irq_active_high;
+	priv->irq_active_high = pdata->irq_active_high;
 
 	irq_flags = priv->irq_active_high ?
 		IRQF_TRIGGER_RISING : IRQF_TRIGGER_FALLING;