summaryrefslogtreecommitdiffstats
path: root/net/irda
diff options
context:
space:
mode:
authorJulius Volz <juliusv@google.com>2008-07-08 03:07:43 -0700
committerDavid S. Miller <davem@davemloft.net>2008-07-08 03:07:43 -0700
commit07035fc1bbf931a06e47583cddd2cea2907ac0db (patch)
tree7fda25add89536a7ae44e4e91537e5815dd59f97 /net/irda
parent02307080622da0312f2ede0f9c0ac779a1cc4f9a (diff)
downloadop-kernel-dev-07035fc1bbf931a06e47583cddd2cea2907ac0db.zip
op-kernel-dev-07035fc1bbf931a06e47583cddd2cea2907ac0db.tar.gz
irda: Fix netlink error path return value
Fix an incorrect return value check of genlmsg_put() in irda_nl_get_mode(). genlmsg_put() does not use ERR_PTR() to encode return values, it just returns NULL on error. Signed-off-by: Julius Volz <juliusv@google.com> Signed-off-by: Samuel Ortiz <samuel@sortiz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/irda')
-rw-r--r--net/irda/irnetlink.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/irda/irnetlink.c b/net/irda/irnetlink.c
index 9e1fb82..2f05ec1 100644
--- a/net/irda/irnetlink.c
+++ b/net/irda/irnetlink.c
@@ -101,8 +101,8 @@ static int irda_nl_get_mode(struct sk_buff *skb, struct genl_info *info)
hdr = genlmsg_put(msg, info->snd_pid, info->snd_seq,
&irda_nl_family, 0, IRDA_NL_CMD_GET_MODE);
- if (IS_ERR(hdr)) {
- ret = PTR_ERR(hdr);
+ if (hdr == NULL) {
+ ret = -EMSGSIZE;
goto err_out;
}
OpenPOWER on IntegriCloud