aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/inet_diag.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2012-11-16 10:42:59 -0500
committerArnd Bergmann <arnd@arndb.de>2012-11-16 10:42:59 -0500
commit57260e4088894de25bb1837d529708c3ec705a69 (patch)
treee7072aed15b203197549099371db55c5d4bc3c0a /net/ipv4/inet_diag.c
parent2d4d07b97c0b774ea9ce2a2105818208d3df7241 (diff)
parent3d5e2abe6e265acc5e1fda810301243e9bac92b2 (diff)
Merge tag 'imx-fixes-rc' of git://git.pengutronix.de/git/imx/linux-2.6 into fixes
From Sascha Hauer <s.hauer@pengutronix.de>: ARM i.MX fixes for 3.7-rc * tag 'imx-fixes-rc' of git://git.pengutronix.de/git/imx/linux-2.6: ARM: imx: ehci: fix host power mask bit ARM i.MX: fix error-valued pointer dereference in clk_register_gate2() Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'net/ipv4/inet_diag.c')
-rw-r--r--net/ipv4/inet_diag.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/ipv4/inet_diag.c b/net/ipv4/inet_diag.c
index 535584c00f91..0c34bfabc11f 100644
--- a/net/ipv4/inet_diag.c
+++ b/net/ipv4/inet_diag.c
@@ -892,13 +892,16 @@ static int __inet_diag_dump(struct sk_buff *skb, struct netlink_callback *cb,
892 struct inet_diag_req_v2 *r, struct nlattr *bc) 892 struct inet_diag_req_v2 *r, struct nlattr *bc)
893{ 893{
894 const struct inet_diag_handler *handler; 894 const struct inet_diag_handler *handler;
895 int err = 0;
895 896
896 handler = inet_diag_lock_handler(r->sdiag_protocol); 897 handler = inet_diag_lock_handler(r->sdiag_protocol);
897 if (!IS_ERR(handler)) 898 if (!IS_ERR(handler))
898 handler->dump(skb, cb, r, bc); 899 handler->dump(skb, cb, r, bc);
900 else
901 err = PTR_ERR(handler);
899 inet_diag_unlock_handler(handler); 902 inet_diag_unlock_handler(handler);
900 903
901 return skb->len; 904 return err ? : skb->len;
902} 905}
903 906
904static int inet_diag_dump(struct sk_buff *skb, struct netlink_callback *cb) 907static int inet_diag_dump(struct sk_buff *skb, struct netlink_callback *cb)