From: Takashi Iwai <tiwai@suse.de>
To: Richard Fitzgerald <rf@opensource.cirrus.com>
Cc: <tiwai@suse.com>, <linux-kernel@vger.kernel.org>,
<patches@opensource.cirrus.com>, <alsa-devel@alsa-project.org>,
<linux-sound@vger.kernel.org>
Subject: Re: [PATCH] ALSA: hda: cs35l56: Fix lifetime of cs_dsp instance
Date: Wed, 08 May 2024 14:34:18 +0200 [thread overview]
Message-ID: <8734qscwj9.wl-tiwai@suse.de> (raw)
In-Reply-To: <20240508100811.49514-1-rf@opensource.cirrus.com>
On Wed, 08 May 2024 12:08:11 +0200,
Richard Fitzgerald wrote:
>
> The cs_dsp instance is initialized in the driver probe() so it
> should be freed in the driver remove(). Also fix a missing call
> to cs_dsp_remove() in the error path of cs35l56_hda_common_probe().
>
> The call to cs_dsp_remove() was being done in the component unbind
> callback cs35l56_hda_unbind(). This meant that if the driver was
> unbound and then re-bound it would be using an uninitialized cs_dsp
> instance.
>
> It is best to initialize the cs_dsp instance in probe() so that it
> can return an error if it fails. The component binding API doesn't
> have any error handling so there's no way to handle a failure if
> cs_dsp was initialized in the bind.
>
> Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
> Fixes: 73cfbfa9caea ("ALSA: hda/cs35l56: Add driver for Cirrus Logic CS35L56 amplifier")
Applied now. Thanks.
Takashi
prev parent reply other threads:[~2024-05-08 12:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-08 10:08 [PATCH] ALSA: hda: cs35l56: Fix lifetime of cs_dsp instance Richard Fitzgerald
2024-05-08 12:34 ` Takashi Iwai [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=8734qscwj9.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=patches@opensource.cirrus.com \
--cc=rf@opensource.cirrus.com \
--cc=tiwai@suse.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