提交 0d8cb946 编写于 作者: D Dan Carpenter 提交者: Jakub Kicinski

devlink: Unlock on error in dumpit()

This needs to unlock before returning.

Fixes: 544e7c33 ("net: devlink: Add support for port regions")
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20201026080127.GB1628785@mwandaSigned-off-by: NJakub Kicinski <kuba@kernel.org>
上级 6c211809
......@@ -4919,8 +4919,10 @@ static int devlink_nl_cmd_region_read_dumpit(struct sk_buff *skb,
index = nla_get_u32(info->attrs[DEVLINK_ATTR_PORT_INDEX]);
port = devlink_port_get_by_index(devlink, index);
if (!port)
return -ENODEV;
if (!port) {
err = -ENODEV;
goto out_unlock;
}
}
region_name = nla_data(attrs[DEVLINK_ATTR_REGION_NAME]);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册