From: Prabhakar Lad Date: Fri, 20 Jul 2012 13:00:57 +0000 (-0300) Subject: [media] davinci: vpbe: fix check for s_dv_preset function pointer X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=dcf4fc2e2efc605382563d6ab6ba1b6f15fa28a0;p=openwrt%2Fstaging%2Fblogic.git [media] davinci: vpbe: fix check for s_dv_preset function pointer fix check for s_dv_preset function pointer to be NULL. return -EINVAL if function pointer is NULL. Signed-off-by: Lad, Prabhakar Signed-off-by: Manjunath Hadli Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/davinci/vpbe_display.c b/drivers/media/video/davinci/vpbe_display.c index e106b72810a9..f78ccc00bc4b 100644 --- a/drivers/media/video/davinci/vpbe_display.c +++ b/drivers/media/video/davinci/vpbe_display.c @@ -1083,7 +1083,7 @@ vpbe_display_s_dv_preset(struct file *file, void *priv, } /* Set the given standard in the encoder */ - if (NULL != vpbe_dev->ops.s_dv_preset) + if (!vpbe_dev->ops.s_dv_preset) return -EINVAL; ret = vpbe_dev->ops.s_dv_preset(vpbe_dev, preset);