Skip to contentSkip to conversation

drivers/media/video/em28xx: memset region size error

PATCH New Jan Ceuleers 1 participant 1 message Oct 3, 2009 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers/media/video/em28xx: memset region size error

Quoted 1 line

From 2082ccb34a1ef5f67ec0618ed05d2f15c67d1da0 Mon Sep 17 00:00:00 2001

From: Jan Ceuleers <[email protected]>
Date: Sat, 3 Oct 2009 16:51:31 +0200
Subject: [PATCH] drivers/media/video/em28xx: 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/media/video/em28xx/em28xx-cards.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/media/video/em28xx/em28xx-cards.c +1 -1
index bdb249b..dd4f19b 100644
@@ -2234,7 +2234,7 @@ void em28xx_register_i2c_ir(struct em28xx *dev)
 	if (disable_ir)
 		return;
 
-	memset(&dev->info, 0, sizeof(&dev->info));
+	memset(&dev->info, 0, sizeof(dev->info));
 	memset(&dev->init_data, 0, sizeof(dev->init_data));
 	strlcpy(dev->info.type, "ir_video", I2C_NAME_SIZE);
 
Signature · 1 line
1.5.4.3