Commit 24a9dbb1 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Bartosz Golaszewski

gpiolib: Move error message out of a spinlock

An error path is a slow path, no need to block other CPUs
when printing error messages.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarBartosz Golaszewski <brgl@bgdev.pl>
parent 43ebbb92
...@@ -288,7 +288,6 @@ static int gpiodev_add_to_list(struct gpio_device *gdev) ...@@ -288,7 +288,6 @@ static int gpiodev_add_to_list(struct gpio_device *gdev)
} }
} }
dev_err(&gdev->dev, "GPIO integer space overlap, cannot add chip\n");
return -EBUSY; return -EBUSY;
} }
...@@ -727,6 +726,7 @@ int gpiochip_add_data_with_key(struct gpio_chip *gc, void *data, ...@@ -727,6 +726,7 @@ int gpiochip_add_data_with_key(struct gpio_chip *gc, void *data,
ret = gpiodev_add_to_list(gdev); ret = gpiodev_add_to_list(gdev);
if (ret) { if (ret) {
spin_unlock_irqrestore(&gpio_lock, flags); spin_unlock_irqrestore(&gpio_lock, flags);
chip_err(gc, "GPIO integer space overlap, cannot add chip\n");
goto err_free_label; goto err_free_label;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment