lkml.org 
[lkml]   [2018]   [Jul]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] staging: bcm2835-audio: Check if workqueue allocation failed
On Fri, Jul 13, 2018 at 12:54:16AM +0300, Tuomas Tynkkynen wrote:
> @@ -424,7 +411,9 @@ int bcm2835_audio_open(struct bcm2835_alsa_stream *alsa_stream)
> int status;
> int ret;
>
> - my_workqueue_init(alsa_stream);
> + alsa_stream->my_wq = alloc_workqueue("my_queue", WQ_HIGHPRI, 1);
> + if (!alsa_stream->my_wq)
> + return -ENOMEM;
>
> ret = bcm2835_audio_open_connection(alsa_stream);
> if (ret) {

This patch is good but if bcm2835_audio_open_connection() fails then
we need to release alsa_stream->my_wq.

regards,
dan carpenter


\
 
 \ /
  Last update: 2018-07-15 22:06    [W:0.141 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site