From: Martin Jansa <martin.jansa@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Julia Lawall <julia@diku.dk>, Martin Jansa <Martin.Jansa@gmail.com>
Subject: [PATCH] pxafb: fix regression from d2a34c13e7ccec5d06eafd60e6f80ea531b34668
Date: Mon, 28 Dec 2009 16:54:43 +0100 [thread overview]
Message-ID: <1262015683-1711-1-git-send-email-Martin.Jansa@gmail.com> (raw)
fbi->dev->platform_data is void * and gcc does not allow to access
!fbi->dev->platform_data->smart_update without cast platform_data to
(struct pxafb_mach_info) or assignment as used in this patch.
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
drivers/video/pxafb.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/drivers/video/pxafb.c b/drivers/video/pxafb.c
index 415858b..241468c 100644
--- a/drivers/video/pxafb.c
+++ b/drivers/video/pxafb.c
@@ -1223,12 +1223,17 @@ static int pxafb_smart_thread(void *arg)
struct pxafb_info *fbi = arg;
struct pxafb_mach_info *inf;
- if (!fbi || !fbi->dev->platform_data->smart_update) {
+ if (!fbi) {
pr_err("%s: not properly initialized, thread terminated\n",
__func__);
return -EINVAL;
}
inf = fbi->dev->platform_data;
+ if (!inf || !inf->smart_update) {
+ pr_err("%s: not properly initialized, thread terminated\n",
+ __func__);
+ return -EINVAL;
+ }
pr_debug("%s(): task starting\n", __func__);
--
1.6.6
next reply other threads:[~2009-12-28 15:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-28 15:54 Martin Jansa [this message]
2010-01-05 22:59 ` Andrew Morton
2010-01-06 0:18 ` Eric Miao
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=1262015683-1711-1-git-send-email-Martin.Jansa@gmail.com \
--to=martin.jansa@gmail.com \
--cc=julia@diku.dk \
--cc=linux-kernel@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
Powered by JetHome