Skip to content

Commit 97e6c85

Browse files
nathanchancedavem330
authored andcommitted
net: usb: aqc111: Initialize wol_cfg with memset in aqc111_suspend
Clang warns: drivers/net/usb/aqc111.c:1326:37: warning: suggest braces around initialization of subobject [-Wmissing-braces] struct aqc111_wol_cfg wol_cfg = { 0 }; ^ {} 1 warning generated. Use memset to initialize the object to take compiler instrumentation out of the equation. Fixes: e58ba45 ("net: usb: aqc111: Add support for wake on LAN by MAGIC packet") Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 315c9e8 commit 97e6c85

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/net/usb/aqc111.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1323,7 +1323,9 @@ static int aqc111_suspend(struct usb_interface *intf, pm_message_t message)
13231323
1, 1, &reg8);
13241324

13251325
if (aqc111_data->wol_flags) {
1326-
struct aqc111_wol_cfg wol_cfg = { 0 };
1326+
struct aqc111_wol_cfg wol_cfg;
1327+
1328+
memset(&wol_cfg, 0, sizeof(struct aqc111_wol_cfg));
13271329

13281330
aqc111_data->phy_cfg |= AQ_WOL;
13291331
ether_addr_copy(wol_cfg.hw_addr, dev->net->dev_addr);

0 commit comments

Comments
 (0)