All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Prevent the NULL dereferencing
@ 2011-04-05  9:58 shubhrajyoti
  2011-04-05 10:25 ` Shubhrajyoti
  0 siblings, 1 reply; 4+ messages in thread
From: shubhrajyoti @ 2011-04-05  9:58 UTC (permalink / raw)
  To: linux-input; +Cc: axel.lin, Shubhrajyoti D

From: Shubhrajyoti D <a0393217@india.ti.com>


Signed-off-by: Shubhrajyoti D <a0393217@india.ti.com>
---
 drivers/input/keyboard/twl4030_keypad.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/input/keyboard/twl4030_keypad.c b/drivers/input/keyboard/twl4030_keypad.c
index 09bef79..cc06c4b 100644
--- a/drivers/input/keyboard/twl4030_keypad.c
+++ b/drivers/input/keyboard/twl4030_keypad.c
@@ -338,7 +338,7 @@ static int __devinit twl4030_kp_probe(struct platform_device *pdev)
 	u8 reg;
 	int error;
 
-	if (!pdata || !pdata->rows || !pdata->cols ||
+	if (!pdata || !pdata->rows || !pdata->cols || !pdata->keymap_data ||
 	    pdata->rows > TWL4030_MAX_ROWS || pdata->cols > TWL4030_MAX_COLS) {
 		dev_err(&pdev->dev, "Invalid platform_data\n");
 		return -EINVAL;
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] Prevent the NULL dereferencing
  2011-04-05  9:58 [PATCH] Prevent the NULL dereferencing shubhrajyoti
@ 2011-04-05 10:25 ` Shubhrajyoti
  2011-04-06 12:47   ` Axel Lin
  0 siblings, 1 reply; 4+ messages in thread
From: Shubhrajyoti @ 2011-04-05 10:25 UTC (permalink / raw)
  To: linux-input; +Cc: axel.lin, Shubhrajyoti D

On Tuesday 05 April 2011 03:28 PM, shubhrajyoti@ti.com wrote:
> From: Shubhrajyoti D<a0393217@india.ti.com>
>
>
> Signed-off-by: Shubhrajyoti D<a0393217@india.ti.com>
Axel's patch added changes to prevent NULL access if pdata is NULL 
adding a check for keymap_data.
> ---
>   drivers/input/keyboard/twl4030_keypad.c |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/input/keyboard/twl4030_keypad.c b/drivers/input/keyboard/twl4030_keypad.c
> index 09bef79..cc06c4b 100644
> --- a/drivers/input/keyboard/twl4030_keypad.c
> +++ b/drivers/input/keyboard/twl4030_keypad.c
> @@ -338,7 +338,7 @@ static int __devinit twl4030_kp_probe(struct platform_device *pdev)
>   	u8 reg;
>   	int error;
>
> -	if (!pdata || !pdata->rows || !pdata->cols ||
> +	if (!pdata || !pdata->rows || !pdata->cols || !pdata->keymap_data ||
>   	    pdata->rows>  TWL4030_MAX_ROWS || pdata->cols>  TWL4030_MAX_COLS) {
>   		dev_err(&pdev->dev, "Invalid platform_data\n");
>   		return -EINVAL;


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Prevent the NULL dereferencing
  2011-04-05 10:25 ` Shubhrajyoti
@ 2011-04-06 12:47   ` Axel Lin
  2011-04-06 22:31     ` Dmitry Torokhov
  0 siblings, 1 reply; 4+ messages in thread
From: Axel Lin @ 2011-04-06 12:47 UTC (permalink / raw)
  To: Shubhrajyoti; +Cc: linux-input, Shubhrajyoti D

2011/4/5 Shubhrajyoti <shubhrajyoti@ti.com>:
> On Tuesday 05 April 2011 03:28 PM, shubhrajyoti@ti.com wrote:
>>
>> From: Shubhrajyoti D<a0393217@india.ti.com>
>>
>>
>> Signed-off-by: Shubhrajyoti D<a0393217@india.ti.com>
>
> Axel's patch added changes to prevent NULL access if pdata is NULL adding a
> check for keymap_data.
>>

Acked-by: Axel Lin <axel.lin@gmail.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Prevent the NULL dereferencing
  2011-04-06 12:47   ` Axel Lin
@ 2011-04-06 22:31     ` Dmitry Torokhov
  0 siblings, 0 replies; 4+ messages in thread
From: Dmitry Torokhov @ 2011-04-06 22:31 UTC (permalink / raw)
  To: Axel Lin; +Cc: Shubhrajyoti, linux-input, Shubhrajyoti D

On Wed, Apr 06, 2011 at 08:47:12PM +0800, Axel Lin wrote:
> 2011/4/5 Shubhrajyoti <shubhrajyoti@ti.com>:
> > On Tuesday 05 April 2011 03:28 PM, shubhrajyoti@ti.com wrote:
> >>
> >> From: Shubhrajyoti D<a0393217@india.ti.com>
> >>
> >>
> >> Signed-off-by: Shubhrajyoti D<a0393217@india.ti.com>
> >
> > Axel's patch added changes to prevent NULL access if pdata is NULL adding a
> > check for keymap_data.
> >>
> 
> Acked-by: Axel Lin <axel.lin@gmail.com>

Applied, thanks Shubhrajyoti.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-04-06 22:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-05  9:58 [PATCH] Prevent the NULL dereferencing shubhrajyoti
2011-04-05 10:25 ` Shubhrajyoti
2011-04-06 12:47   ` Axel Lin
2011-04-06 22:31     ` Dmitry Torokhov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.