projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
drivers/video: Move dereference after NULL test
[cascardo/linux.git]
/
drivers
/
video
/
pxafb.c
diff --git
a/drivers/video/pxafb.c
b/drivers/video/pxafb.c
index
f58a3aa
..
415858b
100644
(file)
--- a/
drivers/video/pxafb.c
+++ b/
drivers/video/pxafb.c
@@
-1221,13
+1221,14
@@
static void setup_smart_timing(struct pxafb_info *fbi,
static int pxafb_smart_thread(void *arg)
{
struct pxafb_info *fbi = arg;
static int pxafb_smart_thread(void *arg)
{
struct pxafb_info *fbi = arg;
- struct pxafb_mach_info *inf
= fbi->dev->platform_data
;
+ struct pxafb_mach_info *inf;
- if (!fbi || !
inf
->smart_update) {
+ if (!fbi || !
fbi->dev->platform_data
->smart_update) {
pr_err("%s: not properly initialized, thread terminated\n",
__func__);
return -EINVAL;
}
pr_err("%s: not properly initialized, thread terminated\n",
__func__);
return -EINVAL;
}
+ inf = fbi->dev->platform_data;
pr_debug("%s(): task starting\n", __func__);
pr_debug("%s(): task starting\n", __func__);
@@
-1667,7
+1668,7
@@
static int pxafb_resume(struct device *dev)
return 0;
}
return 0;
}
-static struct dev_pm_ops pxafb_pm_ops = {
+static
const
struct dev_pm_ops pxafb_pm_ops = {
.suspend = pxafb_suspend,
.resume = pxafb_resume,
};
.suspend = pxafb_suspend,
.resume = pxafb_resume,
};