diff options
author | Syam Sidhardhan <syamsidhardh@gmail.com> | 2013-02-25 04:01:48 +0530 |
---|---|---|
committer | Patrik Jakobsson <patrik.r.jakobsson@gmail.com> | 2013-03-13 22:37:32 +0100 |
commit | 22ccb2a146f92b81cc5731db8c1ee2316cca3576 (patch) | |
tree | 0aabe6511bcbcfa40c9dd357181798bdfbe7b709 /drivers/gpu/drm/gma500/mdfld_dsi_output.c | |
parent | bc6a541941df6e05b0c53133537ce4cf31336c3f (diff) | |
download | op-kernel-dev-22ccb2a146f92b81cc5731db8c1ee2316cca3576.zip op-kernel-dev-22ccb2a146f92b81cc5731db8c1ee2316cca3576.tar.gz |
gma500: medfield: Fix possible NULL pointer dereference
The use of pointer sender should be after the NULL check.
Signed-off-by: Syam Sidhardhan <s.syam@samsung.com>
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Diffstat (limited to 'drivers/gpu/drm/gma500/mdfld_dsi_output.c')
-rw-r--r-- | drivers/gpu/drm/gma500/mdfld_dsi_output.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/drm/gma500/mdfld_dsi_output.c b/drivers/gpu/drm/gma500/mdfld_dsi_output.c index 2d4ab48..3abf831 100644 --- a/drivers/gpu/drm/gma500/mdfld_dsi_output.c +++ b/drivers/gpu/drm/gma500/mdfld_dsi_output.c @@ -92,8 +92,8 @@ void mdfld_dsi_brightness_init(struct mdfld_dsi_config *dsi_config, int pipe) { struct mdfld_dsi_pkg_sender *sender = mdfld_dsi_get_pkg_sender(dsi_config); - struct drm_device *dev = sender->dev; - struct drm_psb_private *dev_priv = dev->dev_private; + struct drm_device *dev; + struct drm_psb_private *dev_priv; u32 gen_ctrl_val; if (!sender) { @@ -101,6 +101,9 @@ void mdfld_dsi_brightness_init(struct mdfld_dsi_config *dsi_config, int pipe) return; } + dev = sender->dev; + dev_priv = dev->dev_private; + /* Set default display backlight value to 85% (0xd8)*/ mdfld_dsi_send_mcs_short(sender, write_display_brightness, 0xd8, 1, true); |