• Andrey Smirnov's avatar
    gpio: vf610: Use devres to disable clk_port · db9ed63c
    Andrey Smirnov authored
    Clk_port should be disabled in all error paths in the code that
    follws, including the case when either gpiochip_add_data() or
    gpiochip_irqchip_add() fail. To simplify things fix this by using
    devm_add_action_or_reset() to disable corresponding clock in case of
    any erros as well as driver/device removal.
    Signed-off-by: default avatarAndrey Smirnov <andrew.smirnov@gmail.com>
    Cc: Linus Walleij <linus.walleij@linaro.org>
    Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
    Cc: Chris Healy <cphealy@gmail.com>
    Cc: Andrew Lunn <andrew@lunn.ch>
    Cc: Heiner Kallweit <hkallweit1@gmail.com>
    Cc: Fabio Estevam <festevam@gmail.com>
    Cc: linux-gpio@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org
    Cc: linux-imx@nxp.com
    Signed-off-by: default avatarBartosz Golaszewski <bgolaszewski@baylibre.com>
    db9ed63c
gpio-vf610.c 8.71 KB