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>
This commit is contained in:
Bartosz Golaszewski
2024-01-31 11:40:57 +01:00
parent 5694f274a0
commit 7fe595b3c3

View File

@@ -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;