Skip to content

Commit

Permalink
netlink: fix error propagation in netlink_mmap()
Browse files Browse the repository at this point in the history
Return the error if something went wrong instead of unconditionally
returning 0.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
kaber authored and davem330 committed Jun 11, 2013
1 parent 1abd165 commit 7cdbac7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/netlink/af_netlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ static int netlink_mmap(struct file *file, struct socket *sock,
err = 0;
out:
mutex_unlock(&nlk->pg_vec_lock);
return 0;
return err;
}

static void netlink_frame_flush_dcache(const struct nl_mmap_hdr *hdr)
Expand Down

0 comments on commit 7cdbac7

Please sign in to comment.