Skip to content

Commit 389328e

Browse files
Jiri Slabygregkh
authored andcommitted
p54: memset(0) whole array
commit 6f17581788206444cbbcdbc107498f85e9765e3d upstream. gcc 7 complains: drivers/net/wireless/intersil/p54/fwio.c: In function 'p54_scan': drivers/net/wireless/intersil/p54/fwio.c:491:4: warning: 'memset' used with length equal to number of elements without multiplication by element size [-Wmemset-elt-size] Fix that by passing the correct size to memset. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Christian Lamparter <chunkeey@googlemail.com> Cc: Kalle Valo <kvalo@codeaurora.org> Acked-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 5acdbe6 commit 389328e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • drivers/net/wireless/p54

drivers/net/wireless/p54/fwio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ int p54_scan(struct p54_common *priv, u16 mode, u16 dwell)
488488

489489
entry += sizeof(__le16);
490490
chan->pa_points_per_curve = 8;
491-
memset(chan->curve_data, 0, sizeof(*chan->curve_data));
491+
memset(chan->curve_data, 0, sizeof(chan->curve_data));
492492
memcpy(chan->curve_data, entry,
493493
sizeof(struct p54_pa_curve_data_sample) *
494494
min((u8)8, curve_data->points_per_channel));

0 commit comments

Comments
 (0)