提交 3bee9b57 编写于 作者: D Dan Carpenter 提交者: Jakub Kicinski

net: microchip: sparx5: Fix uninitialized variable in vcap_path_exist()

The "eport" variable needs to be initialized to NULL for this code to
work.

Fixes: 814e7693 ("net: microchip: vcap api: Add a storage state to a VCAP rule")
Signed-off-by: NDan Carpenter <error27@gmail.com>
Reviewed-by: NSteen Hegelund <Steen.Hegelund@microchip.com>
Link: https://lore.kernel.org/r/Y8qbYAb+YSXo1DgR@kiliSigned-off-by: NJakub Kicinski <kuba@kernel.org>
上级 8a8b70b3
...@@ -2010,7 +2010,8 @@ static int vcap_get_next_chain(struct vcap_control *vctrl, ...@@ -2010,7 +2010,8 @@ static int vcap_get_next_chain(struct vcap_control *vctrl,
static bool vcap_path_exist(struct vcap_control *vctrl, struct net_device *ndev, static bool vcap_path_exist(struct vcap_control *vctrl, struct net_device *ndev,
int dst_cid) int dst_cid)
{ {
struct vcap_enabled_port *eport, *elem; struct vcap_enabled_port *eport = NULL;
struct vcap_enabled_port *elem;
struct vcap_admin *admin; struct vcap_admin *admin;
int tmp; int tmp;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册