]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
devlink: Clear whole devlink_flash_notify struct
authorLeon Romanovsky <leonro@nvidia.com>
Sat, 14 Aug 2021 09:57:30 +0000 (12:57 +0300)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 15 Oct 2021 09:27:10 +0000 (11:27 +0200)
commit7bb1eb2ef53154d728d1ada1ef971979108cf8f0
tree8f5066ce2489179350af8a29c50bf08513ff9057
parent7eb13b54ed4562142764c3b62aad824e1127a239
devlink: Clear whole devlink_flash_notify struct

BugLink: https://bugs.launchpad.net/bugs/1946788
[ Upstream commit ed43fbac717882165a2a4bd64f7b1f56f7467bb7 ]

The { 0 } doesn't clear all fields in the struct, but tells to the
compiler to set all fields to zero and doesn't touch any sub-fields
if they exists.

The {} is an empty initialiser that instructs to fully initialize whole
struct including sub-fields, which is error-prone for future
devlink_flash_notify extensions.

Fixes: 6700acc5f1fe ("devlink: collect flash notify params into a struct")
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
net/core/devlink.c