Skip to content

Commit

Permalink
net: ipmr: ipmr_get_table() returns NULL
Browse files Browse the repository at this point in the history
The ipmr_get_table() function doesn't return error pointers it returns
NULL on error.

Fixes: 4f75ba6 ("net: ipmr: Add ipmr_rtm_getroute")
Signed-off-by: Dan Carpenter <[email protected]>
Acked-by: Nikolay Aleksandrov <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Dan Carpenter authored and davem330 committed Jul 12, 2017
1 parent 88f0f09 commit 2e3d232
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/ipv4/ipmr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 2e3d232

Please sign in to comment.