parisc: led: Fix potential null-ptr-deref in start_task()
[platform/kernel/linux-rpi.git] / drivers / parisc / led.c
index cf91cb0..4c0551f 100644 (file)
@@ -137,6 +137,9 @@ static int start_task(void)
 
        /* Create the work queue and queue the LED task */
        led_wq = create_singlethread_workqueue("led_wq");       
+       if (!led_wq)
+               return -ENOMEM;
+
        queue_delayed_work(led_wq, &led_task, 0);
 
        return 0;