]> Pileus Git - ~andy/linux/blobdiff - net/wimax/stack.c
Merge branch 'docs/docbook/drm' of git://github.com/mfwitten/linux into docs-move
[~andy/linux] / net / wimax / stack.c
index 1ed65dbdab03df1bab0a008a7ca0277ce143bfdb..3c65eae701c463f1a3d4c720873b2cbf44240fbc 100644 (file)
@@ -55,6 +55,7 @@
 #include <net/genetlink.h>
 #include <linux/netdevice.h>
 #include <linux/wimax.h>
+#include <linux/module.h>
 #include "wimax-internal.h"
 
 
@@ -315,12 +316,11 @@ void __wimax_state_change(struct wimax_dev *wimax_dev, enum wimax_st new_state)
                BUG();
        }
        __wimax_state_set(wimax_dev, new_state);
-       if (stch_skb)
+       if (!IS_ERR(stch_skb))
                wimax_gnl_re_state_change_send(wimax_dev, stch_skb, header);
 out:
        d_fnend(3, dev, "(wimax_dev %p new_state %u [old %u]) = void\n",
                wimax_dev, new_state, old_state);
-       return;
 }
 
 
@@ -362,7 +362,6 @@ void wimax_state_change(struct wimax_dev *wimax_dev, enum wimax_st new_state)
        if (wimax_dev->state > __WIMAX_ST_NULL)
                __wimax_state_change(wimax_dev, new_state);
        mutex_unlock(&wimax_dev->mutex);
-       return;
 }
 EXPORT_SYMBOL_GPL(wimax_state_change);