From: Julius Volz 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 Signed-off-by: Samuel Ortiz --- net/irda/irnetlink.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Index: net-next-2.6/net/irda/irnetlink.c =================================================================== --- net-next-2.6.orig/net/irda/irnetlink.c 2008-06-14 13:20:33.000000000 +0200 +++ net-next-2.6/net/irda/irnetlink.c 2008-06-30 21:03:13.000000000 +0200 @@ -101,8 +101,8 @@ static int irda_nl_get_mode(struct sk_bu 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; } -- -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html