From: Dan Carpenter <dan.carpenter@oracle.com>
To: Tuomas Tynkkynen <tuomas@tuxera.com>
Cc: Stefan Wahren <stefan.wahren@i2se.com>,
devel@driverdev.osuosl.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.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: Thu, 12 Jul 2018 23:57:22 -0700 (PDT) [thread overview]
Message-ID: <20180713065721.a5cntccedumupewo@mwanda> (raw)
In-Reply-To: <20180713064816.lv6qhkipi6fpeptj@mwanda>
On Fri, Jul 13, 2018 at 09:48:16AM +0300, Dan Carpenter wrote:
> 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.
Never mind, you handle it in the next patch. The bug *was* there in the
original code as well, so that's a legit way to split the patches.
regards,
dan carpenter
prev parent reply other threads:[~2018-07-13 6:58 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 ` [PATCH 1/2] staging: bcm2835-audio: Check if workqueue allocation failed Dan Carpenter
2018-07-13 6:57 ` Dan Carpenter [this message]
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=20180713065721.a5cntccedumupewo@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®