From: Patrick McHardy Date: Tue, 11 Jun 2013 09:52:47 +0000 (-0700) Subject: netlink: fix error propagation in netlink_mmap() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7cdbac71f911494aa7d0343be23c092ca84a5ed4;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git netlink: fix error propagation in netlink_mmap() Return the error if something went wrong instead of unconditionally returning 0. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller --- 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, 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)