]> err.no Git - linux-2.6/commitdiff
[PATCH] atmel: memset correct range
authorAlexey Dobriyan <adobriyan@gmail.com>
Mon, 7 Nov 2005 21:41:48 +0000 (00:41 +0300)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 8 Nov 2005 02:50:01 +0000 (21:50 -0500)
Specify the correct range when calling memset in atmel_get_range.
Do this by specifying the size of the structure, rather than the size
of the pointer.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/atmel.c

index 1fbe027d26b6266768654b300b3ed0f962d8787a..a3e23527fe7ffd19391df73ae8b95537f2115684 100644 (file)
@@ -2217,7 +2217,7 @@ static int atmel_get_range(struct net_device *dev,
        int k,i,j;
 
        dwrq->length = sizeof(struct iw_range);
-       memset(range, 0, sizeof(range));
+       memset(range, 0, sizeof(struct iw_range));
        range->min_nwid = 0x0000;
        range->max_nwid = 0x0000;
        range->num_channels = 0;