From: Lyude Paul <lyude@redhat.com>
To: nouveau@lists.freedesktop.org
Cc: stable@vger.kernel.org, Ben Skeggs <bskeggs@redhat.com>,
David Airlie <airlied@linux.ie>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: [PATCH v4 1/6] drm/nouveau: Check backlight IDs are >= 0, not > 0
Date: Thu, 6 Sep 2018 17:43:21 -0400 [thread overview]
Message-ID: <20180906214328.24012-2-lyude@redhat.com> (raw)
In-Reply-To: <20180906214328.24012-1-lyude@redhat.com>
Remember, ida IDs start at 0, not 1!
Signed-off-by: Lyude Paul <lyude@redhat.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Cc: stable@vger.kernel.org
---
drivers/gpu/drm/nouveau/nouveau_backlight.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/nouveau_backlight.c b/drivers/gpu/drm/nouveau/nouveau_backlight.c
index 408b955e5c39..6dd72bc32897 100644
--- 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 *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 *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);
}
--
2.17.1
next prev parent reply other threads:[~2018-09-06 21:43 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-06 21:43 [PATCH v4 0/6] Backlight fixes and cleanup Lyude Paul
2018-09-06 21:43 ` Lyude Paul [this message]
2018-09-06 21:43 ` [PATCH v4 2/6] drm/nouveau: Add NV_PRINTK_ONCE and variants Lyude Paul
2018-09-07 5:35 ` Joe Perches
2018-09-07 17:27 ` Lyude Paul
2018-09-06 21:43 ` [PATCH v4 3/6] drm/nouveau: Move backlight device into nouveau_connector Lyude Paul
2018-09-06 21:43 ` [PATCH v4 4/6] drm/nouveau: s/nouveau_backlight_exit/nouveau_backlight_fini/ Lyude Paul
2018-09-06 21:43 ` [PATCH v4 5/6] drm/nouveau: Cleanup indenting in nouveau_backlight.c Lyude Paul
2018-09-06 21:43 ` [PATCH v4 6/6] drm/nouveau: Refactor nvXX_backlight_init() Lyude Paul
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180906214328.24012-2-lyude@redhat.com \
--to=lyude@redhat.com \
--cc=airlied@linux.ie \
--cc=bskeggs@redhat.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nouveau@lists.freedesktop.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).