lkml.org 
[lkml]   [2022]   [Aug]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.10 008/158] mmc: meson-gx: Fix an error handling path in meson_mmc_probe()
    Date
    From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

    commit b3e1cf31154136da855f3cb6117c17eb0b6bcfb4 upstream.

    The commit in Fixes has introduced a new error handling which should goto
    the existing error handling path.
    Otherwise some resources leak.

    Fixes: 19c6beaa064c ("mmc: meson-gx: add device reset")
    Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
    Cc: stable@vger.kernel.org
    Link: https://lore.kernel.org/r/be4b863bacf323521ba3a02efdc4fca9cdedd1a6.1659855351.git.christophe.jaillet@wanadoo.fr
    Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    ---
    drivers/mmc/host/meson-gx-mmc.c | 6 ++++--
    1 file changed, 4 insertions(+), 2 deletions(-)

    --- a/drivers/mmc/host/meson-gx-mmc.c
    +++ b/drivers/mmc/host/meson-gx-mmc.c
    @@ -1161,8 +1161,10 @@ static int meson_mmc_probe(struct platfo
    }

    ret = device_reset_optional(&pdev->dev);
    - if (ret)
    - return dev_err_probe(&pdev->dev, ret, "device reset failed\n");
    + if (ret) {
    + dev_err_probe(&pdev->dev, ret, "device reset failed\n");
    + goto free_host;
    + }

    res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
    host->regs = devm_ioremap_resource(&pdev->dev, res);

    \
     
     \ /
      Last update: 2022-08-23 14:12    [W:4.221 / U:1.068 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site