* [PATCH 1/2] Input: edt-ft5x06 - Remove redundant null check before kfree
@ 2013-03-28 7:53 Sachin Kamat
2013-03-28 7:53 ` [PATCH 2/2] Input: eeti_ts - Remove redundant null check Sachin Kamat
0 siblings, 1 reply; 3+ messages in thread
From: Sachin Kamat @ 2013-03-28 7:53 UTC (permalink / raw)
To: linux-input; +Cc: dmitry.torokhov, sachin.kamat
kfree on a null pointer is a no-op. Hence null check is not
necessary.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
drivers/input/touchscreen/edt-ft5x06.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c
index a917015..83fa1b1 100644
--- a/drivers/input/touchscreen/edt-ft5x06.c
+++ b/drivers/input/touchscreen/edt-ft5x06.c
@@ -440,8 +440,7 @@ static int edt_ft5x06_work_mode(struct edt_ft5x06_ts_data *tsdata)
return -EIO;
}
- if (tsdata->raw_buffer)
- kfree(tsdata->raw_buffer);
+ kfree(tsdata->raw_buffer);
tsdata->raw_buffer = NULL;
/* restore parameters */
--
1.7.4.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] Input: eeti_ts - Remove redundant null check
2013-03-28 7:53 [PATCH 1/2] Input: edt-ft5x06 - Remove redundant null check before kfree Sachin Kamat
@ 2013-03-28 7:53 ` Sachin Kamat
2013-03-31 7:26 ` Dmitry Torokhov
0 siblings, 1 reply; 3+ messages in thread
From: Sachin Kamat @ 2013-03-28 7:53 UTC (permalink / raw)
To: linux-input; +Cc: dmitry.torokhov, sachin.kamat
'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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 2/2] Input: eeti_ts - Remove redundant null check
2013-03-28 7:53 ` [PATCH 2/2] Input: eeti_ts - Remove redundant null check Sachin Kamat
@ 2013-03-31 7:26 ` Dmitry Torokhov
0 siblings, 0 replies; 3+ messages in thread
From: Dmitry Torokhov @ 2013-03-31 7:26 UTC (permalink / raw)
To: Sachin Kamat; +Cc: linux-input
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.
--
Dmitry
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-03-31 7:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-28 7:53 [PATCH 1/2] Input: edt-ft5x06 - Remove redundant null check before kfree Sachin Kamat
2013-03-28 7:53 ` [PATCH 2/2] Input: eeti_ts - Remove redundant null check Sachin Kamat
2013-03-31 7:26 ` Dmitry Torokhov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).