lkml.org 
[lkml]   [2009]   [Oct]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] lcd: Fix wrong sizeof
Which is why I have always preferred sizeof(struct foo) over
sizeof(var).

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Richard Purdie <rpurdie@rpsys.net>
---
Stable team, this one applies to 2.6.31, 2.6.30 and 2.6.27.
drivers/video/backlight/lcd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- linux-2.6.32-rc1.orig/drivers/video/backlight/lcd.c 2009-06-10 05:05:27.000000000 +0200
+++ linux-2.6.32-rc1/drivers/video/backlight/lcd.c 2009-10-02 10:18:49.000000000 +0200
@@ -56,7 +56,7 @@ static int fb_notifier_callback(struct n

static int lcd_register_fb(struct lcd_device *ld)
{
- memset(&ld->fb_notif, 0, sizeof(&ld->fb_notif));
+ memset(&ld->fb_notif, 0, sizeof(ld->fb_notif));
ld->fb_notif.notifier_call = fb_notifier_callback;
return fb_register_client(&ld->fb_notif);
}

--
Jean Delvare


\
 
 \ /
  Last update: 2009-10-02 11:31    [from the cache]
©2003-2011 Jasper Spaans