From: Alexey Dobriyan Date: Mon, 7 Nov 2005 21:41:48 +0000 (+0300) Subject: [PATCH] atmel: memset correct range X-Git-Tag: v2.6.15-rc1~69^2~19^2~1 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f36be62115aabd50b4eda0f06f07ab5fae2e9cfd;p=linux-2.6 [PATCH] atmel: memset correct range 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 Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/atmel.c b/drivers/net/wireless/atmel.c index 1fbe027d26..a3e23527fe 100644 --- a/drivers/net/wireless/atmel.c +++ b/drivers/net/wireless/atmel.c @@ -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;