All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: "James (Qian) Wang" <james.qian.wang@arm.com>
Cc: David Airlie <airlied@linux.ie>,
	Liviu Dudau <liviu.dudau@arm.com>,
	kernel-janitors@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: [PATCH] drm/komeda: Fix a signedness bug
Date: Mon, 21 Jan 2019 13:59:52 +0000	[thread overview]
Message-ID: <20190121135952.GA14103@kadam> (raw)

The mdev->irq value comes from platform_get_irq() so it can't be more
than INT_MAX and if it's unsigned then it breaks the error handling in
komeda_parse_dt().

Fixes: 29e56aec911d ("drm/komeda: Add DT parsing")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 drivers/gpu/drm/arm/display/komeda/komeda_dev.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_dev.h b/drivers/gpu/drm/arm/display/komeda/komeda_dev.h
index a0bf7050037a..a52da6180c69 100644
--- a/drivers/gpu/drm/arm/display/komeda/komeda_dev.h
+++ b/drivers/gpu/drm/arm/display/komeda/komeda_dev.h
@@ -82,7 +82,7 @@ struct komeda_dev {
 	struct clk *mclk;
 
 	/** @irq: irq number */
-	u32 irq;
+	int irq;
 
 	int n_pipelines;
 	struct komeda_pipeline *pipelines[KOMEDA_MAX_PIPELINES];
-- 
2.17.1

WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: "James (Qian) Wang" <james.qian.wang@arm.com>
Cc: David Airlie <airlied@linux.ie>,
	Liviu Dudau <liviu.dudau@arm.com>,
	kernel-janitors@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: [PATCH] drm/komeda: Fix a signedness bug
Date: Mon, 21 Jan 2019 16:59:52 +0300	[thread overview]
Message-ID: <20190121135952.GA14103@kadam> (raw)

The mdev->irq value comes from platform_get_irq() so it can't be more
than INT_MAX and if it's unsigned then it breaks the error handling in
komeda_parse_dt().

Fixes: 29e56aec911d ("drm/komeda: Add DT parsing")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 drivers/gpu/drm/arm/display/komeda/komeda_dev.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_dev.h b/drivers/gpu/drm/arm/display/komeda/komeda_dev.h
index a0bf7050037a..a52da6180c69 100644
--- a/drivers/gpu/drm/arm/display/komeda/komeda_dev.h
+++ b/drivers/gpu/drm/arm/display/komeda/komeda_dev.h
@@ -82,7 +82,7 @@ struct komeda_dev {
 	struct clk *mclk;
 
 	/** @irq: irq number */
-	u32 irq;
+	int irq;
 
 	int n_pipelines;
 	struct komeda_pipeline *pipelines[KOMEDA_MAX_PIPELINES];
-- 
2.17.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

             reply	other threads:[~2019-01-21 13:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-21 13:59 Dan Carpenter [this message]
2019-01-21 13:59 ` [PATCH] drm/komeda: Fix a signedness bug Dan Carpenter
2019-01-22 10:00 ` james qian wang (Arm Technology China)
2019-01-22 10:00   ` james qian wang (Arm Technology China)

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=20190121135952.GA14103@kadam \
    --to=dan.carpenter@oracle.com \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=james.qian.wang@arm.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=liviu.dudau@arm.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.