lkml.org 
[lkml]   [2022]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 6.0 811/862] soundwire: intel: fix error handling on dai registration issues
    Date
    From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

    [ Upstream commit c6867cda906aadbce5e71efde9c78a26108b2bad ]

    The call to intel_register_dai() may fail because of memory allocation
    issues or problems reported by the ASoC core. In all cases, when a
    error is thrown the component is not registered, it's invalid to
    unregister it.

    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    Reviewed-by: Rander Wang <rander.wang@intel.com>
    Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
    Link: https://lore.kernel.org/r/20220919175721.354679-2-yung-chuan.liao@linux.intel.com
    Signed-off-by: Vinod Koul <vkoul@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    drivers/soundwire/intel.c | 1 -
    1 file changed, 1 deletion(-)

    diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c
    index 89d1d0d021fc..af6c1a93372d 100644
    --- a/drivers/soundwire/intel.c
    +++ b/drivers/soundwire/intel.c
    @@ -1429,7 +1429,6 @@ int intel_link_startup(struct auxiliary_device *auxdev)
    ret = intel_register_dai(sdw);
    if (ret) {
    dev_err(dev, "DAI registration failed: %d\n", ret);
    - snd_soc_unregister_component(dev);
    goto err_interrupt;
    }

    --
    2.35.1


    \
     
     \ /
      Last update: 2022-10-19 12:38    [W:2.805 / U:0.052 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site