Re: [Nouveau] [PATCH 3/3] drm/nouveau/led: abort early if the device does not have GPIOs
Reviewed-by: Karol Herbst 2016-09-16 9:34 GMT+02:00 Martin Peres : > Signed-off-by: Martin Peres > --- > drm/nouveau/nouveau_led.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drm/nouveau/nouveau_led.c b/drm/nouveau/nouveau_led.c > index 1f731da..3e2f1b6 100644 > --- a/drm/nouveau/nouveau_led.c > +++ b/drm/nouveau/nouveau_led.c > @@ -82,6 +82,9 @@ nouveau_led_init(struct drm_device *dev) > struct dcb_gpio_func logo_led; > int ret; > > + if (!gpio) > + return 0; > + > /* check that there is a GPIO controlling the logo LED */ > if (nvkm_gpio_find(gpio, 0, DCB_GPIO_LOGO_LED_PWM, 0xff, &logo_led)) > return 0; > -- > 2.8.0 > > ___ > Nouveau mailing list > Nouveau@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/nouveau ___ Nouveau mailing list Nouveau@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/nouveau
Re: [Nouveau] [PATCH 3/3] drm/nouveau/led: abort early if the device does not have GPIOs
On Fri, Sep 16, 2016 at 4:34 PM, Martin Peres wrote: > Signed-off-by: Martin Peres Tested-by: Alexandre Courbot Fixes the crash I was seeing on Tegra, thanks! ___ Nouveau mailing list Nouveau@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/nouveau
[Nouveau] [PATCH 3/3] drm/nouveau/led: abort early if the device does not have GPIOs
Signed-off-by: Martin Peres --- drm/nouveau/nouveau_led.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drm/nouveau/nouveau_led.c b/drm/nouveau/nouveau_led.c index 1f731da..3e2f1b6 100644 --- a/drm/nouveau/nouveau_led.c +++ b/drm/nouveau/nouveau_led.c @@ -82,6 +82,9 @@ nouveau_led_init(struct drm_device *dev) struct dcb_gpio_func logo_led; int ret; + if (!gpio) + return 0; + /* check that there is a GPIO controlling the logo LED */ if (nvkm_gpio_find(gpio, 0, DCB_GPIO_LOGO_LED_PWM, 0xff, &logo_led)) return 0; -- 2.8.0 ___ Nouveau mailing list Nouveau@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/nouveau