Skip to contentSkip to conversation

drivers/media/dvb/dvb-usb: 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/dvb/dvb-usb: memset region size error

Quoted 1 line

From bb568359751d84b485dbbf04f1317a77c6c3f6f0 Mon Sep 17 00:00:00 2001

From: Jan Ceuleers <[email protected]>
Date: Sat, 3 Oct 2009 16:58:51 +0200
Subject: [PATCH] drivers/media/dvb/dvb-usb: 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/dvb/dvb-usb/ce6230.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/media/dvb/dvb-usb/ce6230.c +1 -1
index 0737c63..3df2045 100644
@@ -105,7 +105,7 @@ static int ce6230_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[],
 	int i = 0;
 	struct req_t req;
 	int ret = 0;
-	memset(&req, 0, sizeof(&req));
+	memset(&req, 0, sizeof(req));
 
 	if (num > 2)
 		return -EINVAL;
Signature · 1 line
1.5.4.3