* [PATCH] drivers:video:fbdev atmel_lcdfb.c power GPIO registration bug
@ 2014-06-19 1:52 ` Michael Welling
0 siblings, 0 replies; 6+ messages in thread
From: Michael Welling @ 2014-06-19 1:52 UTC (permalink / raw)
To: Jean-Christophe Plagniol-Villard, Tomi Valkeinen, Nicolas Ferre,
linux-fbdev, linux-kernel
Cc: Michael Welling
A list that was intended for storing power control GPIOs was never
initialized correctly or filled. Without these lines of added code
the kernel hangs when trying to access an uninitialized list when a
power control GPIO is registered with the device tree.
Signed-off-by: Michael Welling <mwelling@ieee.org>
---
drivers/video/fbdev/atmel_lcdfb.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/video/fbdev/atmel_lcdfb.c b/drivers/video/fbdev/atmel_lcdfb.c
index e683b6e..d36e830 100644
--- a/drivers/video/fbdev/atmel_lcdfb.c
+++ b/drivers/video/fbdev/atmel_lcdfb.c
@@ -1057,6 +1057,7 @@ static int atmel_lcdfb_of_init(struct atmel_lcdfb_info *sinfo)
goto put_display_node;
}
+ INIT_LIST_HEAD(&pdata->pwr_gpios);
ret = -ENOMEM;
for (i = 0; i < of_gpio_named_count(display_np, "atmel,power-control-gpio"); i++) {
gpio = of_get_named_gpio_flags(display_np, "atmel,power-control-gpio",
@@ -1082,6 +1083,7 @@ static int atmel_lcdfb_of_init(struct atmel_lcdfb_info *sinfo)
dev_err(dev, "set direction output gpio %d failed\n", gpio);
goto put_display_node;
}
+ list_add(&og->list, &pdata->pwr_gpios);
}
if (is_gpio_power)
--
1.7.9.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] drivers:video:fbdev atmel_lcdfb.c power GPIO registration bug
@ 2014-06-19 1:52 ` Michael Welling
0 siblings, 0 replies; 6+ messages in thread
From: Michael Welling @ 2014-06-19 1:52 UTC (permalink / raw)
To: Jean-Christophe Plagniol-Villard, Tomi Valkeinen, Nicolas Ferre,
linux-fbdev, linux-kernel
Cc: Michael Welling
A list that was intended for storing power control GPIOs was never
initialized correctly or filled. Without these lines of added code
the kernel hangs when trying to access an uninitialized list when a
power control GPIO is registered with the device tree.
Signed-off-by: Michael Welling <mwelling@ieee.org>
---
drivers/video/fbdev/atmel_lcdfb.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/video/fbdev/atmel_lcdfb.c b/drivers/video/fbdev/atmel_lcdfb.c
index e683b6e..d36e830 100644
--- a/drivers/video/fbdev/atmel_lcdfb.c
+++ b/drivers/video/fbdev/atmel_lcdfb.c
@@ -1057,6 +1057,7 @@ static int atmel_lcdfb_of_init(struct atmel_lcdfb_info *sinfo)
goto put_display_node;
}
+ INIT_LIST_HEAD(&pdata->pwr_gpios);
ret = -ENOMEM;
for (i = 0; i < of_gpio_named_count(display_np, "atmel,power-control-gpio"); i++) {
gpio = of_get_named_gpio_flags(display_np, "atmel,power-control-gpio",
@@ -1082,6 +1083,7 @@ static int atmel_lcdfb_of_init(struct atmel_lcdfb_info *sinfo)
dev_err(dev, "set direction output gpio %d failed\n", gpio);
goto put_display_node;
}
+ list_add(&og->list, &pdata->pwr_gpios);
}
if (is_gpio_power)
--
1.7.9.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] drivers:video:fbdev atmel_lcdfb.c power GPIO registration bug
2014-06-19 1:52 ` Michael Welling
@ 2014-06-19 7:04 ` Nicolas Ferre
-1 siblings, 0 replies; 6+ messages in thread
From: Nicolas Ferre @ 2014-06-19 7:04 UTC (permalink / raw)
To: Michael Welling, Jean-Christophe Plagniol-Villard, Tomi Valkeinen,
linux-fbdev, linux-kernel
On 19/06/2014 03:52, Michael Welling :
> A list that was intended for storing power control GPIOs was never
> initialized correctly or filled. Without these lines of added code
> the kernel hangs when trying to access an uninitialized list when a
> power control GPIO is registered with the device tree.
>
> Signed-off-by: Michael Welling <mwelling@ieee.org>
Indeed.
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Thanks, best regards,
> ---
> drivers/video/fbdev/atmel_lcdfb.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/video/fbdev/atmel_lcdfb.c b/drivers/video/fbdev/atmel_lcdfb.c
> index e683b6e..d36e830 100644
> --- a/drivers/video/fbdev/atmel_lcdfb.c
> +++ b/drivers/video/fbdev/atmel_lcdfb.c
> @@ -1057,6 +1057,7 @@ static int atmel_lcdfb_of_init(struct atmel_lcdfb_info *sinfo)
> goto put_display_node;
> }
>
> + INIT_LIST_HEAD(&pdata->pwr_gpios);
> ret = -ENOMEM;
> for (i = 0; i < of_gpio_named_count(display_np, "atmel,power-control-gpio"); i++) {
> gpio = of_get_named_gpio_flags(display_np, "atmel,power-control-gpio",
> @@ -1082,6 +1083,7 @@ static int atmel_lcdfb_of_init(struct atmel_lcdfb_info *sinfo)
> dev_err(dev, "set direction output gpio %d failed\n", gpio);
> goto put_display_node;
> }
> + list_add(&og->list, &pdata->pwr_gpios);
> }
>
> if (is_gpio_power)
>
--
Nicolas Ferre
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drivers:video:fbdev atmel_lcdfb.c power GPIO registration bug
@ 2014-06-19 7:04 ` Nicolas Ferre
0 siblings, 0 replies; 6+ messages in thread
From: Nicolas Ferre @ 2014-06-19 7:04 UTC (permalink / raw)
To: Michael Welling, Jean-Christophe Plagniol-Villard, Tomi Valkeinen,
linux-fbdev, linux-kernel
On 19/06/2014 03:52, Michael Welling :
> A list that was intended for storing power control GPIOs was never
> initialized correctly or filled. Without these lines of added code
> the kernel hangs when trying to access an uninitialized list when a
> power control GPIO is registered with the device tree.
>
> Signed-off-by: Michael Welling <mwelling@ieee.org>
Indeed.
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Thanks, best regards,
> ---
> drivers/video/fbdev/atmel_lcdfb.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/video/fbdev/atmel_lcdfb.c b/drivers/video/fbdev/atmel_lcdfb.c
> index e683b6e..d36e830 100644
> --- a/drivers/video/fbdev/atmel_lcdfb.c
> +++ b/drivers/video/fbdev/atmel_lcdfb.c
> @@ -1057,6 +1057,7 @@ static int atmel_lcdfb_of_init(struct atmel_lcdfb_info *sinfo)
> goto put_display_node;
> }
>
> + INIT_LIST_HEAD(&pdata->pwr_gpios);
> ret = -ENOMEM;
> for (i = 0; i < of_gpio_named_count(display_np, "atmel,power-control-gpio"); i++) {
> gpio = of_get_named_gpio_flags(display_np, "atmel,power-control-gpio",
> @@ -1082,6 +1083,7 @@ static int atmel_lcdfb_of_init(struct atmel_lcdfb_info *sinfo)
> dev_err(dev, "set direction output gpio %d failed\n", gpio);
> goto put_display_node;
> }
> + list_add(&og->list, &pdata->pwr_gpios);
> }
>
> if (is_gpio_power)
>
--
Nicolas Ferre
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drivers:video:fbdev atmel_lcdfb.c power GPIO registration bug
2014-06-19 1:52 ` Michael Welling
@ 2014-06-23 11:46 ` Tomi Valkeinen
-1 siblings, 0 replies; 6+ messages in thread
From: Tomi Valkeinen @ 2014-06-23 11:46 UTC (permalink / raw)
To: Michael Welling, Jean-Christophe Plagniol-Villard, Nicolas Ferre,
linux-fbdev, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1352 bytes --]
On 19/06/14 04:52, Michael Welling wrote:
> A list that was intended for storing power control GPIOs was never
> initialized correctly or filled. Without these lines of added code
> the kernel hangs when trying to access an uninitialized list when a
> power control GPIO is registered with the device tree.
>
> Signed-off-by: Michael Welling <mwelling@ieee.org>
> ---
> drivers/video/fbdev/atmel_lcdfb.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/video/fbdev/atmel_lcdfb.c b/drivers/video/fbdev/atmel_lcdfb.c
> index e683b6e..d36e830 100644
> --- a/drivers/video/fbdev/atmel_lcdfb.c
> +++ b/drivers/video/fbdev/atmel_lcdfb.c
> @@ -1057,6 +1057,7 @@ static int atmel_lcdfb_of_init(struct atmel_lcdfb_info *sinfo)
> goto put_display_node;
> }
>
> + INIT_LIST_HEAD(&pdata->pwr_gpios);
> ret = -ENOMEM;
> for (i = 0; i < of_gpio_named_count(display_np, "atmel,power-control-gpio"); i++) {
> gpio = of_get_named_gpio_flags(display_np, "atmel,power-control-gpio",
> @@ -1082,6 +1083,7 @@ static int atmel_lcdfb_of_init(struct atmel_lcdfb_info *sinfo)
> dev_err(dev, "set direction output gpio %d failed\n", gpio);
> goto put_display_node;
> }
> + list_add(&og->list, &pdata->pwr_gpios);
> }
>
> if (is_gpio_power)
>
Thanks, queued for 3.16-fixes.
Tomi
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drivers:video:fbdev atmel_lcdfb.c power GPIO registration bug
@ 2014-06-23 11:46 ` Tomi Valkeinen
0 siblings, 0 replies; 6+ messages in thread
From: Tomi Valkeinen @ 2014-06-23 11:46 UTC (permalink / raw)
To: Michael Welling, Jean-Christophe Plagniol-Villard, Nicolas Ferre,
linux-fbdev, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1352 bytes --]
On 19/06/14 04:52, Michael Welling wrote:
> A list that was intended for storing power control GPIOs was never
> initialized correctly or filled. Without these lines of added code
> the kernel hangs when trying to access an uninitialized list when a
> power control GPIO is registered with the device tree.
>
> Signed-off-by: Michael Welling <mwelling@ieee.org>
> ---
> drivers/video/fbdev/atmel_lcdfb.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/video/fbdev/atmel_lcdfb.c b/drivers/video/fbdev/atmel_lcdfb.c
> index e683b6e..d36e830 100644
> --- a/drivers/video/fbdev/atmel_lcdfb.c
> +++ b/drivers/video/fbdev/atmel_lcdfb.c
> @@ -1057,6 +1057,7 @@ static int atmel_lcdfb_of_init(struct atmel_lcdfb_info *sinfo)
> goto put_display_node;
> }
>
> + INIT_LIST_HEAD(&pdata->pwr_gpios);
> ret = -ENOMEM;
> for (i = 0; i < of_gpio_named_count(display_np, "atmel,power-control-gpio"); i++) {
> gpio = of_get_named_gpio_flags(display_np, "atmel,power-control-gpio",
> @@ -1082,6 +1083,7 @@ static int atmel_lcdfb_of_init(struct atmel_lcdfb_info *sinfo)
> dev_err(dev, "set direction output gpio %d failed\n", gpio);
> goto put_display_node;
> }
> + list_add(&og->list, &pdata->pwr_gpios);
> }
>
> if (is_gpio_power)
>
Thanks, queued for 3.16-fixes.
Tomi
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-06-23 11:46 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-19 1:52 [PATCH] drivers:video:fbdev atmel_lcdfb.c power GPIO registration bug Michael Welling
2014-06-19 1:52 ` Michael Welling
2014-06-19 7:04 ` Nicolas Ferre
2014-06-19 7:04 ` Nicolas Ferre
2014-06-23 11:46 ` Tomi Valkeinen
2014-06-23 11:46 ` Tomi Valkeinen
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.