Staging: wlan-ng: fix sparse warning in prism2fw.c
authorA Raghavendra Rao <raghav3276@gmail.com>
Thu, 7 Aug 2014 08:40:39 +0000 (14:10 +0530)
committerBen Hutchings <ben@decadent.org.uk>
Sat, 11 Nov 2017 13:34:51 +0000 (13:34 +0000)
commit32a6af2a2753ca072c46887af39e2aaaab38ed4b
tree5e703d867956d834f359387b854b44aff68e0339
parent537aebf3c411c6db49d98b0c4c34cd588e632c49
Staging: wlan-ng: fix sparse warning in prism2fw.c

commit 41cb65c4854e14f12b1cbb8215e509d8ad4d0c88 upstream.

Fix the following sparse warning :

In file included from drivers/staging/wlan-ng/prism2usb.c:5:0:
drivers/staging/wlan-ng/prism2fw.c: In function
‘read_cardpda.constprop.43’:
drivers/staging/wlan-ng/prism2fw.c:792:1: warning: the frame size of
1068 bytes is larger than 1024 bytes [-Wframe-larger-than=]

The variable to 'struct p80211msg_p2req_readpda' was previously being created
on the stack, which inturn exeeded the frame size limit, resulting in a
sparse warning. This patch alloctes the memory to the structure dynamically
and the operations are left unchanged.

Signed-off-by: A Raghavendra Rao <arrao@cdac.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/staging/wlan-ng/prism2fw.c