OSDN Git Service

staging: bcm2835-audio: Check if workqueue allocation failed
authorTuomas Tynkkynen <tuomas@tuxera.com>
Thu, 12 Jul 2018 21:54:16 +0000 (00:54 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 13 Jul 2018 09:37:34 +0000 (11:37 +0200)
commit4feb0f375f030050906c834fde8bf80ac4a4571b
tree040b1984d7b5dee4729e7e3508f6864338be8bb0
parent81f34e96dc9f965e80497ffbc764bf931b91ac5f
staging: bcm2835-audio: Check if workqueue allocation failed

Currently, if allocating a workqueue fails, the driver will probe
successfully but it will silently do nothing, which is rather silly.
So instead bail out with -ENOMEM in bcm2835_audio_open() if
alloc_workqueue() fails, and remove the now pointless checks for a NULL
workqueue.

While at it, get rid of the rather pointless one-line function
my_workqueue_init().

Signed-off-by: Tuomas Tynkkynen <tuomas@tuxera.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c