ALSA: HDA: Fix Oops caused by dereference NULL pointer
[pandora-kernel.git] / sound / pci / hda / hda_codec.c
index 4707b6c..faabaa5 100644 (file)
@@ -615,6 +615,9 @@ int snd_hda_queue_unsol_event(struct hda_bus *bus, u32 res, u32 res_ex)
        struct hda_bus_unsolicited *unsol;
        unsigned int wp;
 
+       if (!bus || !bus->workq)
+               return 0;
+
        trace_hda_unsol_event(bus, res, res_ex);
        unsol = bus->unsol;
        if (!unsol)