wimax: fix oops if netlink fails to add attribute
authorInaky Perez-Gonzalez <inaky@linux.intel.com>
Tue, 31 Mar 2009 00:50:17 +0000 (17:50 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 15 Jun 2009 16:39:58 +0000 (09:39 -0700)
commit7e3ab8deaa79f69dc99ce624f3cc857e746d62d4
treef09e1ac7f134d1d33ee57a42e64b987955c151f8
parent923811b7bd5e6dbc21a384147367e682e698eeda
wimax: fix oops if netlink fails to add attribute

commit d1a2627a29667fe7c4a9d06e1579a2d65bd39bba upstream.

When sending a message to user space using wimax_msg(), if nla_put()
fails, correctly interpret the return code from wimax_msg_alloc() as
an err ptr and return the error code instead of crashing (as it is
assuming than non-NULL means the pointer is ok).

Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/wimax/op-msg.c