* [patch] backlight/pcf50633: check for NULL consistently in
@ 2011-03-29 3:20 Dan Carpenter
2011-03-29 11:19 ` [patch] backlight/pcf50633: check for NULL consistently in pcf50633_bl_probe() Lars-Peter Clausen
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2011-03-29 3:20 UTC (permalink / raw)
To: linux-fbdev
We checked "pdata" for NULL at the start of the function so we should
check it here as well.
Signed-off-by: Dan Carpenter <error27@gmail.com>
---
Compile tested only. Please review.
diff --git a/drivers/video/backlight/pcf50633-backlight.c b/drivers/video/backlight/pcf50633-backlight.c
index ef5628d..0fe934f 100644
--- a/drivers/video/backlight/pcf50633-backlight.c
+++ b/drivers/video/backlight/pcf50633-backlight.c
@@ -136,7 +136,9 @@ static int __devinit pcf50633_bl_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, pcf_bl);
- pcf50633_reg_write(pcf_bl->pcf, PCF50633_REG_LEDDIM, pdata->ramp_time);
+ if (pdata)
+ pcf50633_reg_write(pcf_bl->pcf, PCF50633_REG_LEDDIM,
+ pdata->ramp_time);
/* Should be different from bl_props.brightness, so we do not exit
* update_status early the first time it's called */
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [patch] backlight/pcf50633: check for NULL consistently in pcf50633_bl_probe()
2011-03-29 3:20 [patch] backlight/pcf50633: check for NULL consistently in Dan Carpenter
@ 2011-03-29 11:19 ` Lars-Peter Clausen
0 siblings, 0 replies; 2+ messages in thread
From: Lars-Peter Clausen @ 2011-03-29 11:19 UTC (permalink / raw)
To: linux-fbdev
On 03/29/2011 05:20 AM, Dan Carpenter wrote:
> We checked "pdata" for NULL at the start of the function so we should
> check it here as well.
>
> Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
> ---
> Compile tested only. Please review.
>
> diff --git a/drivers/video/backlight/pcf50633-backlight.c b/drivers/video/backlight/pcf50633-backlight.c
> index ef5628d..0fe934f 100644
> --- a/drivers/video/backlight/pcf50633-backlight.c
> +++ b/drivers/video/backlight/pcf50633-backlight.c
> @@ -136,7 +136,9 @@ static int __devinit pcf50633_bl_probe(struct platform_device *pdev)
>
> platform_set_drvdata(pdev, pcf_bl);
>
> - pcf50633_reg_write(pcf_bl->pcf, PCF50633_REG_LEDDIM, pdata->ramp_time);
> + if (pdata)
> + pcf50633_reg_write(pcf_bl->pcf, PCF50633_REG_LEDDIM,
> + pdata->ramp_time);
>
> /* Should be different from bl_props.brightness, so we do not exit
> * update_status early the first time it's called */
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-03-29 11:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-29 3:20 [patch] backlight/pcf50633: check for NULL consistently in Dan Carpenter
2011-03-29 11:19 ` [patch] backlight/pcf50633: check for NULL consistently in pcf50633_bl_probe() Lars-Peter Clausen
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).