提交 7cdbac71 编写于 作者: P Patrick McHardy 提交者: David S. Miller

netlink: fix error propagation in netlink_mmap()

Return the error if something went wrong instead of unconditionally
returning 0.
Signed-off-by: NPatrick McHardy <kaber@trash.net>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 1abd165e
...@@ -371,7 +371,7 @@ static int netlink_mmap(struct file *file, struct socket *sock, ...@@ -371,7 +371,7 @@ static int netlink_mmap(struct file *file, struct socket *sock,
err = 0; err = 0;
out: out:
mutex_unlock(&nlk->pg_vec_lock); mutex_unlock(&nlk->pg_vec_lock);
return 0; return err;
} }
static void netlink_frame_flush_dcache(const struct nl_mmap_hdr *hdr) static void netlink_frame_flush_dcache(const struct nl_mmap_hdr *hdr)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册