netlink: fix error propagation in netlink_mmap()

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>
This commit is contained in:
Patrick McHardy 2013-06-11 02:52:47 -07:00 committed by David S. Miller
parent 1abd165ed7
commit 7cdbac71f9

View file

@ -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)