summaryrefslogtreecommitdiff
path: root/drivers/gpio
diff options
context:
space:
mode:
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>2024-01-31 13:40:57 +0300
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>2024-02-12 12:51:17 +0300
commit7fe595b3c3cf3f9b8f21fce72f1f48a2cb41522e (patch)
treef50f32f2d5de863f82ecf1278670f30cee1fe2bc /drivers/gpio
parent5694f274a060ebd0e7128c11501281197fb7a5ce (diff)
downloadlinux-7fe595b3c3cf3f9b8f21fce72f1f48a2cb41522e.tar.xz
gpio: don't dereference gdev->chip in gpiochip_setup_dev()
We don't need to dereference gdev->chip in gpiochip_setup_dev() as at the time it's called, the label in the associated struct gpio_device is already set. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Diffstat (limited to 'drivers/gpio')
-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 c6966c55816a..9fc9cfac7081 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -723,7 +723,7 @@ static int gpiochip_setup_dev(struct gpio_device *gdev)
goto err_remove_device;
dev_dbg(&gdev->dev, "registered GPIOs %d to %d on %s\n", gdev->base,
- gdev->base + gdev->ngpio - 1, gdev->chip->label ? : "generic");
+ gdev->base + gdev->ngpio - 1, gdev->label);
return 0;