net: microchip: vcap: Fix initialization of value and mask
authorHoratiu Vultur <horatiu.vultur@microchip.com>
Mon, 19 Dec 2022 08:22:15 +0000 (09:22 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 19 Dec 2022 12:23:39 +0000 (12:23 +0000)
commit10073399cb5e389ab275bd1c9df4b486a2f0c9d4
tree53c61f496d10ad3e00c5fa3e03c961fda55ddd54
parent98dbec0a0adc10d9441b6c29315406e275532eb3
net: microchip: vcap: Fix initialization of value and mask

Fix the following smatch warning:

smatch warnings:
drivers/net/ethernet/microchip/vcap/vcap_api_debugfs.c:103 vcap_debugfs_show_rule_keyfield() error: uninitialized symbol 'value'.
drivers/net/ethernet/microchip/vcap/vcap_api_debugfs.c:106 vcap_debugfs_show_rule_keyfield() error: uninitialized symbol 'mask'.

In case the vcap field was VCAP_FIELD_U128 and the key was different
than IP6_S/DIP then the value and mask were not initialized, therefore
initialize them.

Fixes: 610c32b2ce66 ("net: microchip: vcap: Add vcap_get_rule")
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <error27@gmail.com>
Reviewed-by: Saeed Mahameed <saeed@kernel.org>
Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/microchip/vcap/vcap_api_debugfs.c