staging: bcm2835-audio: Don't leak workqueue if open fails
authorTuomas Tynkkynen <tuomas@tuxera.com>
Thu, 12 Jul 2018 21:54:17 +0000 (00:54 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 13 Jul 2018 09:37:34 +0000 (11:37 +0200)
commit678c5b119307c40f9a17152512f9c949d0ec7292
treeedc06dca3bdf6d8810815332d8e15f23033ded92
parent4feb0f375f030050906c834fde8bf80ac4a4571b
staging: bcm2835-audio: Don't leak workqueue if open fails

Currently, if bcm2835_audio_open() fails partway, the allocated
workqueue is leaked. Avoid that.

While at it, propagate the return value of
bcm2835_audio_open_connection() on failure instead of returning -1.

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