diff options
author | Bartosz Golaszewski <bartosz.golaszewski@linaro.org> | 2024-01-31 11:40:57 +0100 |
---|---|---|
committer | Bartosz Golaszewski <bartosz.golaszewski@linaro.org> | 2024-02-12 10:51:17 +0100 |
commit | 7fe595b3c3cf3f9b8f21fce72f1f48a2cb41522e (patch) | |
tree | f50f32f2d5de863f82ecf1278670f30cee1fe2bc /drivers/gpio/gpiolib.c | |
parent | 5694f274a060ebd0e7128c11501281197fb7a5ce (diff) |
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/gpiolib.c')
-rw-r--r-- | drivers/gpio/gpiolib.c | 2 |
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; |