Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion drivers/video/msm/msm_fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -3730,7 +3730,7 @@ static int msmfb_display_commit(struct fb_info *info,
static int msm_fb_ioctl(struct fb_info *info, unsigned int cmd,
unsigned long arg)
{
struct msm_fb_data_type *mfd = (struct msm_fb_data_type *)info->par;
struct msm_fb_data_type *mfd;
void __user *argp = (void __user *)arg;
struct fb_cursor cursor;
struct fb_cmap cmap;
Expand All @@ -3748,6 +3748,10 @@ static int msm_fb_ioctl(struct fb_info *info, unsigned int cmd,
struct mdp_buf_sync buf_sync;
int ret = 0;
msm_fb_pan_idle(mfd);

if (!info || !info->par)
return -EINVAL;
mfd = (struct msm_fb_data_type *)info->par;

switch (cmd) {
#ifdef CONFIG_FB_MSM_OVERLAY
Expand Down