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>
Wed, 26 Sep 2018 06:38:12 +0000 (08:38 +0200)
commit34240e87d244a1db8ec4cc4997ee44bf4a54d680
treefc136e86a9c2b662d22f8a9c3157975443accc2e
parent8e3015e8736ab82811ce11b9ee8adba2d8a40464
staging: bcm2835-audio: Don't leak workqueue if open fails

[ Upstream commit 678c5b119307c40f9a17152512f9c949d0ec7292 ]

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>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c