W1: fix memset size error
authorLi Zefan <lizf@cn.fujitsu.com>
Thu, 15 Nov 2007 00:58:34 +0000 (16:58 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Thu, 15 Nov 2007 02:45:36 +0000 (18:45 -0800)
The size argument passed to memset is wrong.

Signed-off-by Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/w1/masters/ds2490.c

index 299e274d241ae298748151c9f63cf30fbdd91d9d..b63b5e044a4cc7aa641c26ea1de8906f7a4656c4 100644 (file)
@@ -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);