From: Dan Carpenter <dan.carpenter@oracle.com>
To: Tuomas Tynkkynen <tuomas@tuxera.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Stefan Wahren <stefan.wahren@i2se.com>,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
Eric Anholt <eric@anholt.net>,
linux-rpi-kernel@lists.infradead.org
Subject: Re: [PATCH 1/2] staging: bcm2835-audio: Check if workqueue allocation failed
Date: Fri, 13 Jul 2018 09:48:16 +0300 [thread overview]
Message-ID: <20180713064816.lv6qhkipi6fpeptj@mwanda> (raw)
In-Reply-To: <20180712215417.22491-1-tuomas@tuxera.com>
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
next prev parent reply other threads:[~2018-07-13 6:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-12 21:54 Tuomas Tynkkynen
2018-07-12 21:54 ` [PATCH 2/2] staging: bcm2835-audio: Don't leak workqueue if open fails Tuomas Tynkkynen
2018-07-13 6:48 ` Dan Carpenter [this message]
2018-07-13 6:57 ` [PATCH 1/2] staging: bcm2835-audio: Check if workqueue allocation failed Dan Carpenter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180713064816.lv6qhkipi6fpeptj@mwanda \
--to=dan.carpenter@oracle.com \
--cc=devel@driverdev.osuosl.org \
--cc=eric@anholt.net \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rpi-kernel@lists.infradead.org \
--cc=stefan.wahren@i2se.com \
--cc=tuomas@tuxera.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®