Commit da2c3f0ead336c04b4d1ad36ff42d8d264f44f65
1 parent
6b7b284958
Exists in
master
and in
7 other branches
[ARM] pxafb: fix building issue of incorrect reference
Commit "d2a34c1 drivers/video: Move dereference after NULL test" introduced a build error of "fbi->dev->platform_data->smart_update" being unknown type to the compiler, fix this by removing the unnecessary test of 'fbi'. Cc: Julia Lawall <julia@diku.dk> Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Showing 1 changed file with 2 additions and 2 deletions Side-by-side Diff
drivers/video/pxafb.c
... | ... | @@ -1221,9 +1221,9 @@ |
1221 | 1221 | static int pxafb_smart_thread(void *arg) |
1222 | 1222 | { |
1223 | 1223 | struct pxafb_info *fbi = arg; |
1224 | - struct pxafb_mach_info *inf; | |
1224 | + struct pxafb_mach_info *inf = fbi->dev->platform_data; | |
1225 | 1225 | |
1226 | - if (!fbi || !fbi->dev->platform_data->smart_update) { | |
1226 | + if (!inf->smart_update) { | |
1227 | 1227 | pr_err("%s: not properly initialized, thread terminated\n", |
1228 | 1228 | __func__); |
1229 | 1229 | return -EINVAL; |