lkml.org 
[lkml]   [2015]   [Dec]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Subject[PATCH] gpio-ucb1400: Delete an unnecessary variable initialisation in ucb1400_gpio_probe()
    From
    Date
    From: Markus Elfring <elfring@users.sourceforge.net>
    Date: Fri, 25 Dec 2015 19:36:20 +0100

    The variable "err" will eventually be set to an appropriate value
    from a call of the gpiochip_add() function.
    Thus let us omit the explicit initialisation at the beginning.

    Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
    ---
    drivers/gpio/gpio-ucb1400.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/drivers/gpio/gpio-ucb1400.c b/drivers/gpio/gpio-ucb1400.c
    index d502825..c963517 100644
    --- a/drivers/gpio/gpio-ucb1400.c
    +++ b/drivers/gpio/gpio-ucb1400.c
    @@ -46,7 +46,7 @@ static void ucb1400_gpio_set(struct gpio_chip *gc, unsigned off, int val)
    static int ucb1400_gpio_probe(struct platform_device *dev)
    {
    struct ucb1400_gpio *ucb = dev_get_platdata(&dev->dev);
    - int err = 0;
    + int err;

    if (!(ucb && ucb->gpio_offset)) {
    err = -EINVAL;
    --
    2.6.3


    \
     
     \ /
      Last update: 2015-12-25 20:01    [W:4.034 / U:0.676 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site