diff options
author | Patrick McHardy <kaber@trash.net> | 2013-06-11 05:52:47 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-06-11 05:52:47 -0400 |
commit | 7cdbac71f911494aa7d0343be23c092ca84a5ed4 (patch) | |
tree | 17a4958c72bde3bb69eb9ceb52910968ddb195f6 /net | |
parent | 1abd165ed757db1afdefaac0a4bc8a70f97d258c (diff) |
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>
Diffstat (limited to 'net')
-rw-r--r-- | net/netlink/af_netlink.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index d0b3dd60d386..57ee84d21470 100644 --- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c | |||
@@ -371,7 +371,7 @@ static int netlink_mmap(struct file *file, struct socket *sock, | |||
371 | err = 0; | 371 | err = 0; |
372 | out: | 372 | out: |
373 | mutex_unlock(&nlk->pg_vec_lock); | 373 | mutex_unlock(&nlk->pg_vec_lock); |
374 | return 0; | 374 | return err; |
375 | } | 375 | } |
376 | 376 | ||
377 | static void netlink_frame_flush_dcache(const struct nl_mmap_hdr *hdr) | 377 | static void netlink_frame_flush_dcache(const struct nl_mmap_hdr *hdr) |