solve rfkill-wlan driver kernel panic when rfkill-bt driver probe fail
authorhwg <hwg@rock-chips.com>
Thu, 29 Jan 2015 09:29:03 +0000 (17:29 +0800)
committerhwg <hwg@rock-chips.com>
Thu, 29 Jan 2015 09:29:18 +0000 (17:29 +0800)
net/rfkill/rfkill-bt.c

index 28a7e225d8cc00909cc5a27c708e8215d1321ecf..61b955b34a1b29c2198ad100a43894c1848d88d7 100755 (executable)
@@ -660,12 +660,12 @@ static int rfkill_rk_probe(struct platform_device *pdev)
 fail_rfkill:
        rfkill_destroy(rfkill->rfkill_dev);
 fail_alloc:
-    g_rfkill = NULL;
 
        remove_proc_entry("btwrite", sleep_dir);
        remove_proc_entry("lpm", sleep_dir);
 fail_gpio:
 
+        g_rfkill = NULL;
        return ret;
 }