[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20181119162632.432140889@linuxfoundation.org>
Date: Mon, 19 Nov 2018 17:29:23 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Lyude Paul <lyude@...hat.com>,
Karol Herbst <kherbst@...hat.com>,
Ben Skeggs <bskeggs@...hat.com>
Subject: [PATCH 4.14 109/124] drm/nouveau: Check backlight IDs are >= 0, not > 0
4.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lyude Paul <lyude@...hat.com>
commit dc854914999d5d52ac1b31740cb0ea8d89d0372e upstream.
Remember, ida IDs start at 0, not 1!
Signed-off-by: Lyude Paul <lyude@...hat.com>
Reviewed-by: Karol Herbst <kherbst@...hat.com>
Cc: stable@...r.kernel.org
Signed-off-by: Ben Skeggs <bskeggs@...hat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
drivers/gpu/drm/nouveau/nouveau_backlight.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/gpu/drm/nouveau/nouveau_backlight.c
+++ b/drivers/gpu/drm/nouveau/nouveau_backlight.c
@@ -116,7 +116,7 @@ nv40_backlight_init(struct drm_connector
&nv40_bl_ops, &props);
if (IS_ERR(bd)) {
- if (bl_connector.id > 0)
+ if (bl_connector.id >= 0)
ida_simple_remove(&bl_ida, bl_connector.id);
return PTR_ERR(bd);
}
@@ -249,7 +249,7 @@ nv50_backlight_init(struct drm_connector
nv_encoder, ops, &props);
if (IS_ERR(bd)) {
- if (bl_connector.id > 0)
+ if (bl_connector.id >= 0)
ida_simple_remove(&bl_ida, bl_connector.id);
return PTR_ERR(bd);
}
Powered by blists - more mailing lists