提交 97e6c858 编写于 作者: N Nathan Chancellor 提交者: David S. Miller

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: e58ba454 ("net: usb: aqc111: Add support for wake on LAN by MAGIC packet")
Signed-off-by: NNathan Chancellor <natechancellor@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 315c9e83
......@@ -1323,7 +1323,9 @@ static int aqc111_suspend(struct usb_interface *intf, pm_message_t message)
1, 1, &reg8);
if (aqc111_data->wol_flags) {
struct aqc111_wol_cfg wol_cfg = { 0 };
struct aqc111_wol_cfg wol_cfg;
memset(&wol_cfg, 0, sizeof(struct aqc111_wol_cfg));
aqc111_data->phy_cfg |= AQ_WOL;
ether_addr_copy(wol_cfg.hw_addr, dev->net->dev_addr);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册