[PATCH] lcd: Fix wrong sizeof

From: Jean Delvare
Date: Fri Oct 02 2009 - 05:28:26 EST


Which is why I have always preferred sizeof(struct foo) over
sizeof(var).

Signed-off-by: Jean Delvare <khali@xxxxxxxxxxxx>
Cc: Richard Purdie <rpurdie@xxxxxxxxx>
---
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/