Skip to contentSkip to conversation

drivers/video/backlight: memset region size error

PATCH In review Jan Ceuleers 2 participants 2 messages Oct 3, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers/video/backlight: memset region size error

Quoted 1 line

From 61755f56b829f59a40f9d30799651f80a3554104 Mon Sep 17 00:00:00 2001

From: Jan Ceuleers <[email protected]>
Date: Sat, 3 Oct 2009 16:00:36 +0200
Subject: [PATCH] drivers/video/backlight: memset region size error

The size of the region to be memset() should be the size of the target rather than the size of the pointer to it.

Compile-tested only.

---
 drivers/video/backlight/lcd.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/video/backlight/lcd.c +1 -1
index b644947..a482dd7 100644
@@ -56,7 +56,7 @@ static int fb_notifier_callback(struct notifier_block *self,
 
 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);
 }
Signature · 1 line
1.5.4.3
#1 lore raw
Quoted 11 lines · Jan Ceuleers

From 61755f56b829f59a40f9d30799651f80a3554104 Mon Sep 17 00:00:00 2001
From: Jan Ceuleers <[email protected]>
Date: Sat, 3 Oct 2009 16:00:36 +0200
Subject: [PATCH] drivers/video/backlight: memset region size error

The size of the region to be memset() should be the size of the target rather than the size of the pointer to it.

Compile-tested only.

The same patch was posted yesterday by Jean Delvare and I've queued that but thanks!

Cheers,

Richard

Signature · 2 lines
Richard Purdie
Intel Open Source Technology Centre