提交 2e3d232e 编写于 作者: D Dan Carpenter 提交者: David S. Miller

net: ipmr: ipmr_get_table() returns NULL

The ipmr_get_table() function doesn't return error pointers it returns
NULL on error.

Fixes: 4f75ba69 ("net: ipmr: Add ipmr_rtm_getroute")
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Acked-by: NNikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 88f0f09b
......@@ -2431,8 +2431,8 @@ static int ipmr_rtm_getroute(struct sk_buff *in_skb, struct nlmsghdr *nlh,
tableid = tb[RTA_TABLE] ? nla_get_u32(tb[RTA_TABLE]) : 0;
mrt = ipmr_get_table(net, tableid ? tableid : RT_TABLE_DEFAULT);
if (IS_ERR(mrt)) {
err = PTR_ERR(mrt);
if (!mrt) {
err = -ENOENT;
goto errout_free;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册