Skip to contentSkip to conversation

W1: fix memset size error

PATCH In review Li Zefan 2 participants 2 messages Nov 5, 2007 W1 dallas's 1-wire bus

lore
Share & tools
lore

Li Zefan

author
#0 lore raw

PATCH 6/6 W1: fix memset size error

The size arguments passing to memset is wrong.

Signed-off-by Li Zefan <[email protected]>

---
 drivers/w1/masters/ds2490.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/w1/masters/ds2490.c +1 -1
index 299e274..b63b5e0 100644
@@ -233,7 +233,7 @@ static int ds_recv_status_nodump(struct ds_device *dev, struct ds_status *st,
 {
 	int count, err;
 
-	memset(st, 0, sizeof(st));
+	memset(st, 0, sizeof(*st));
 
 	count = 0;
 	err = usb_bulk_msg(dev->udev, usb_rcvbulkpipe(dev->udev, dev->ep[EP_STATUS]), buf, size, &count, 100);
Signature · 1 line
1.5.3.rc7
#1 lore raw
Quoted 3 lines · Li Zefan

The size arguments passing to memset is wrong.

Signed-off-by Li Zefan <[email protected]>

Thanks a lot, patch is obviously correct.

ACK.

Signature · 1 line
	Evgeniy Polyakov