lkml.org 
[lkml]   [2021]   [May]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.4 212/244] i2c: sh7760: fix IRQ error path
    Date
    From: Sergey Shtylyov <s.shtylyov@omprussia.ru>

    [ Upstream commit 92dfb27240fea2776f61c5422472cb6defca7767 ]

    While adding the invalid IRQ check after calling platform_get_irq(),
    I managed to overlook that the driver has a complex error path in its
    probe() method, thus a simple *return* couldn't be used. Use a proper
    *goto* instead!

    Fixes: e5b2e3e74201 ("i2c: sh7760: add IRQ check")
    Signed-off-by: Sergey Shtylyov <s.shtylyov@omprussia.ru>
    Signed-off-by: Wolfram Sang <wsa@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    drivers/i2c/busses/i2c-sh7760.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/drivers/i2c/busses/i2c-sh7760.c b/drivers/i2c/busses/i2c-sh7760.c
    index c79c9f542c5a..319d1fa617c8 100644
    --- a/drivers/i2c/busses/i2c-sh7760.c
    +++ b/drivers/i2c/busses/i2c-sh7760.c
    @@ -473,7 +473,7 @@ static int sh7760_i2c_probe(struct platform_device *pdev)

    ret = platform_get_irq(pdev, 0);
    if (ret < 0)
    - return ret;
    + goto out3;
    id->irq = ret;

    id->adap.nr = pdev->id;
    --
    2.30.2


    \
     
     \ /
      Last update: 2021-05-12 17:31    [W:4.122 / U:0.044 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site