lkml.org 
[lkml]   [2021]   [Sep]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.14 083/217] usb: bdc: Fix an error handling path in bdc_probe() when no suitable DMA config is available
    Date
    From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

    [ Upstream commit d2f42e09393c774ab79088d8e3afcc62b3328fc9 ]

    If no suitable DMA configuration is available, a previous 'bdc_phy_init()'
    call must be undone by a corresponding 'bdc_phy_exit()' call.

    Branch to the existing error handling path instead of returning
    directly.

    Fixes: cc29d4f67757 ("usb: bdc: Add support for USB phy")
    Acked-by: Florian Fainelli <f.fainelli@gmail.com>
    Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
    Link: https://lore.kernel.org/r/0c5910979f39225d5d8fe68c9ab1c147c68ddee1.1629314734.git.christophe.jaillet@wanadoo.fr
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    drivers/usb/gadget/udc/bdc/bdc_core.c | 3 ++-
    1 file changed, 2 insertions(+), 1 deletion(-)

    diff --git a/drivers/usb/gadget/udc/bdc/bdc_core.c b/drivers/usb/gadget/udc/bdc/bdc_core.c
    index 58ba04d858ba..23a27eb33c42 100644
    --- a/drivers/usb/gadget/udc/bdc/bdc_core.c
    +++ b/drivers/usb/gadget/udc/bdc/bdc_core.c
    @@ -573,7 +573,8 @@ static int bdc_probe(struct platform_device *pdev)
    if (ret) {
    dev_err(dev,
    "No suitable DMA config available, abort\n");
    - return -ENOTSUPP;
    + ret = -ENOTSUPP;
    + goto phycleanup;
    }
    dev_dbg(dev, "Using 32-bit address\n");
    }
    --
    2.30.2


    \
     
     \ /
      Last update: 2021-09-20 19:19    [W:4.032 / U:0.048 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site