diff --git a/drivers/staging/gma500/backlight.c b/drivers/staging/gma500/backlight.c index 4027e700561a..d3e698b4de61 100644 --- a/drivers/staging/gma500/backlight.c +++ b/drivers/staging/gma500/backlight.c @@ -38,9 +38,10 @@ void gma_backlight_exit(struct drm_device *dev) { #ifdef CONFIG_BACKLIGHT_CLASS_DEVICE struct drm_psb_private *dev_priv = dev->dev_private; - dev_priv->backlight_device->props.brightness = 0; - backlight_update_status(dev_priv->backlight_device); - if (dev_priv->backlight_device) + if (dev_priv->backlight_device) { + dev_priv->backlight_device->props.brightness = 0; + backlight_update_status(dev_priv->backlight_device); backlight_device_unregister(dev_priv->backlight_device); + } #endif }