From: Jarkko Nikula <jarkko.nikula@linux.intel.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: Liam Girdwood <liam.r.girdwood@linux.intel.com>,
alsa-devel@alsa-project.org, Mark Brown <broonie@kernel.org>,
Liam Girdwood <lgirdwood@gmail.com>
Subject: Re: [PATCH 2/2] ASoC: Intel: sst-acpi: Request firmware before SST platform driver probing
Date: Wed, 19 Feb 2014 09:28:39 +0200 [thread overview]
Message-ID: <53045D27.4060803@linux.intel.com> (raw)
In-Reply-To: <s5hvbwby3np.wl%tiwai@suse.de>
Hi
On 02/19/2014 09:15 AM, Takashi Iwai wrote:
> At Wed, 19 Feb 2014 08:57:53 +0200,
> Jarkko Nikula wrote:
>>
>> I felt it was needless to test NULL pointers here since release_firmware
>> checks it directly and platform_device_unregister indirectly. Not in
>> platform_device_unregister but when calling platform_device_del and
>> platform_device_put there.
> The problem is that it may contain ERR_PTR(xxx). You have to either
> clear to NULL in
>
> if (IS_ERR(sst_acpi->pdev_pcm)) {
> dev_err(dev, "Cannot register device %s. Error %d\n",
> desc->drv_name, (int)PTR_ERR(sst_acpi->pdev_pcm));
> sst_acpi->pdev_pcm = NULL;
> }
>
> or check conditionally like
>
> if (!IS_ERR_OR_NULL(sst_acpi->pdev_pcm))
> platform_device_unregister(sst_acpi->pdev_pcm);
>
> Maybe the former is better.
>
Oh yes and I'm even testing it with the IS_ERR and PTR_ERR. Why that
knowledge did not carry to sst_acpi_remove... will fix.
--
Jarkko
next prev parent reply other threads:[~2014-02-19 7:28 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-18 14:42 [PATCH 1/2] ASoC: Intel: Move extended fw base and size fields in struct sst_pdata Jarkko Nikula
2014-02-18 14:42 ` [PATCH 2/2] ASoC: Intel: sst-acpi: Request firmware before SST platform driver probing Jarkko Nikula
2014-02-18 14:58 ` Takashi Iwai
2014-02-19 6:57 ` Jarkko Nikula
2014-02-19 7:09 ` Jarkko Nikula
2014-02-19 7:15 ` Takashi Iwai
2014-02-19 7:28 ` Jarkko Nikula [this message]
2014-02-19 4:41 ` [PATCH 1/2] ASoC: Intel: Move extended fw base and size fields in struct sst_pdata Mark Brown
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=53045D27.4060803@linux.intel.com \
--to=jarkko.nikula@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=liam.r.girdwood@linux.intel.com \
--cc=tiwai@suse.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.