Loading drivers/gpio/gpiolib.c +7 −6 Original line number Diff line number Diff line Loading @@ -1968,11 +1968,9 @@ static int gpiod_request_commit(struct gpio_desc *desc, const char *label) if (test_and_set_bit(FLAG_REQUESTED, &desc->flags) == 0) { desc_set_label(desc, label ? : "?"); ret = 0; } else { kfree_const(label); ret = -EBUSY; goto done; goto out_free_unlock; } if (gc->request) { Loading @@ -1987,9 +1985,8 @@ static int gpiod_request_commit(struct gpio_desc *desc, const char *label) if (ret) { desc_set_label(desc, NULL); kfree_const(label); clear_bit(FLAG_REQUESTED, &desc->flags); goto done; goto out_free_unlock; } } if (gc->get_direction) { Loading @@ -1998,8 +1995,12 @@ static int gpiod_request_commit(struct gpio_desc *desc, const char *label) gpiod_get_direction(desc); spin_lock_irqsave(&gpio_lock, flags); } done: spin_unlock_irqrestore(&gpio_lock, flags); return 0; out_free_unlock: spin_unlock_irqrestore(&gpio_lock, flags); kfree_const(label); return ret; } Loading Loading
drivers/gpio/gpiolib.c +7 −6 Original line number Diff line number Diff line Loading @@ -1968,11 +1968,9 @@ static int gpiod_request_commit(struct gpio_desc *desc, const char *label) if (test_and_set_bit(FLAG_REQUESTED, &desc->flags) == 0) { desc_set_label(desc, label ? : "?"); ret = 0; } else { kfree_const(label); ret = -EBUSY; goto done; goto out_free_unlock; } if (gc->request) { Loading @@ -1987,9 +1985,8 @@ static int gpiod_request_commit(struct gpio_desc *desc, const char *label) if (ret) { desc_set_label(desc, NULL); kfree_const(label); clear_bit(FLAG_REQUESTED, &desc->flags); goto done; goto out_free_unlock; } } if (gc->get_direction) { Loading @@ -1998,8 +1995,12 @@ static int gpiod_request_commit(struct gpio_desc *desc, const char *label) gpiod_get_direction(desc); spin_lock_irqsave(&gpio_lock, flags); } done: spin_unlock_irqrestore(&gpio_lock, flags); return 0; out_free_unlock: spin_unlock_irqrestore(&gpio_lock, flags); kfree_const(label); return ret; } Loading