summaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpiolib.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2022-03-30 17:59:10 +0300
committerBartosz Golaszewski <brgl@bgdev.pl>2022-04-09 22:36:03 +0200
commit24a9dbb1c1575b9890bb7d9028cc89894da6dc22 (patch)
tree8e1d629d90e4bb173fbdcbd4a2e545839686192c /drivers/gpio/gpiolib.c
parent43ebbb92e43fc9d85f6ff8b2a01c20ab5cf08678 (diff)
downloadlinux-24a9dbb1c1575b9890bb7d9028cc89894da6dc22.tar.bz2
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: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
Diffstat (limited to 'drivers/gpio/gpiolib.c')
-rw-r--r--drivers/gpio/gpiolib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 3ffe7b6cebbf..1e4aa358e606 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -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;
}
@@ -727,6 +726,7 @@ int gpiochip_add_data_with_key(struct gpio_chip *gc, void *data,
ret = gpiodev_add_to_list(gdev);
if (ret) {
spin_unlock_irqrestore(&gpio_lock, flags);
+ chip_err(gc, "GPIO integer space overlap, cannot add chip\n");
goto err_free_label;
}