[alsa-devel] [PATCH 2/2] ASoC: Intel: sst-acpi: Request firmware before SST platform driver probing
Jarkko Nikula
jarkko.nikula at linux.intel.com
Wed Feb 19 08:09:57 CET 2014
On 02/19/2014 08:57 AM, Jarkko Nikula wrote:
> Hi
>
> On 02/18/2014 04:58 PM, Takashi Iwai wrote:
>> At Tue, 18 Feb 2014 16:42:03 +0200,
>> Jarkko Nikula wrote:
>>> -sst_err:
>>> - platform_device_unregister(sst_acpi->pdev_pcm);
>>> - return ret;
>>> + /* continue SST probing after firmware is loaded */
>>> + return request_firmware_nowait(THIS_MODULE, true,
>>> desc->fw_filename,
>>> + dev, GFP_KERNEL, pdev, sst_acpi_fw_cb);
>> sst_acpi->pdev_mach still should be unregistered when
>> request_firmware_nowait() returns an error.
> I was thinking to leave that for sst_acpi_remove but you are right, it
> doesn't make sense to leave it registered for instance if
> request_firmware_nowait fails because of -ENOMEM or some other fatal
> issue.
>
Answering myself after cup of coffee... Obviously probe function must
free whatever it allocated when it returns with an error. In other words
module loading fails and we won't ever call the remove function.
--
Jarkko
More information about the Alsa-devel
mailing list