diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2014-03-12 12:52:36 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2014-03-12 12:52:36 +0000 |
commit | 25e870eed60c817f16429ee1c4c7d2fe56da2bc1 (patch) | |
tree | 38175eeadbb1adf16a7c9ea818d79485236b5eeb /target/linux | |
parent | 24095302aaa3ddd81726783f37cda972e781c575 (diff) | |
download | mtk-20170518-25e870eed60c817f16429ee1c4c7d2fe56da2bc1.zip mtk-20170518-25e870eed60c817f16429ee1c4c7d2fe56da2bc1.tar.gz mtk-20170518-25e870eed60c817f16429ee1c4c7d2fe56da2bc1.tar.bz2 |
ar71xx: ar934x_nfc: fix memory initialization bug
sizeof(array_from_function_definition) gives back the size of the pointer.
sizeof(type) * array_size should be used in memset.
Signed-off-by: David Völgyes <david.volgyes@gmail.com>
Patchwork: http://patchwork.openwrt.org/patch/4950/
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
SVN-Revision: 39890
Diffstat (limited to 'target/linux')
-rw-r--r-- | target/linux/ar71xx/files/arch/mips/ath79/dev-nfc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/dev-nfc.c b/target/linux/ar71xx/files/arch/mips/ath79/dev-nfc.c index d140cd0..9b5256e 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/dev-nfc.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/dev-nfc.c @@ -43,7 +43,7 @@ static void __init ath79_nfc_init_resource(struct resource res[2], unsigned long size, int irq) { - memset(res, 0, sizeof(res)); + memset(res, 0, sizeof(struct resource) * 2); res[0].flags = IORESOURCE_MEM; res[0].start = base; |