lkml.org 
[lkml]   [2012]   [Sep]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] media: davinci: vpif: add check for NULL handler
Date
On Thu August 16 2012 16:02:00 Prabhakar Lad wrote:
> From: Lad, Prabhakar <prabhakar.lad@ti.com>
>
> Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
> Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
> Cc: Hans Verkuil <hans.verkuil@cisco.com>

Acked-by: Hans Verkuil <hans.verkuil@cisco.com>

Regards,

Hans

> ---
> drivers/media/video/davinci/vpif_capture.c | 12 +++++++-----
> drivers/media/video/davinci/vpif_display.c | 14 ++++++++------
> 2 files changed, 15 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/media/video/davinci/vpif_capture.c b/drivers/media/video/davinci/vpif_capture.c
> index 266025e..a87b7a5 100644
> --- a/drivers/media/video/davinci/vpif_capture.c
> +++ b/drivers/media/video/davinci/vpif_capture.c
> @@ -311,12 +311,14 @@ static int vpif_start_streaming(struct vb2_queue *vq, unsigned int count)
> }
>
> /* configure 1 or 2 channel mode */
> - ret = vpif_config_data->setup_input_channel_mode
> - (vpif->std_info.ycmux_mode);
> + if (vpif_config_data->setup_input_channel_mode) {
> + ret = vpif_config_data->setup_input_channel_mode
> + (vpif->std_info.ycmux_mode);
>
> - if (ret < 0) {
> - vpif_dbg(1, debug, "can't set vpif channel mode\n");
> - return ret;
> + if (ret < 0) {
> + vpif_dbg(1, debug, "can't set vpif channel mode\n");
> + return ret;
> + }
> }
>
> /* Call vpif_set_params function to set the parameters and addresses */
> diff --git a/drivers/media/video/davinci/vpif_display.c b/drivers/media/video/davinci/vpif_display.c
> index e129c98..1e35f92 100644
> --- a/drivers/media/video/davinci/vpif_display.c
> +++ b/drivers/media/video/davinci/vpif_display.c
> @@ -280,12 +280,14 @@ static int vpif_start_streaming(struct vb2_queue *vq, unsigned int count)
> }
>
> /* clock settings */
> - ret =
> - vpif_config_data->set_clock(ch->vpifparams.std_info.ycmux_mode,
> - ch->vpifparams.std_info.hd_sd);
> - if (ret < 0) {
> - vpif_err("can't set clock\n");
> - return ret;
> + if (vpif_config_data->set_clock) {
> + ret =
> + vpif_config_data->set_clock(ch->vpifparams.std_info.ycmux_mode,
> + ch->vpifparams.std_info.hd_sd);
> + if (ret < 0) {
> + vpif_err("can't set clock\n");
> + return ret;
> + }
> }
>
> /* set the parameters and addresses */
>


\
 
 \ /
  Last update: 2012-09-17 13:21    [W:0.623 / U:0.668 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site