Re: [PATCH] staging/most: fix return value for DIM_GetChannelState

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 9 Aug 2015 17:08:41 +0300
Tomas Melin <tomas.melin@xxxxxx> wrote:

> Return NULL instead of 0 for invalid input.
> 
> Signed-off-by: Tomas Melin <tomas.melin@xxxxxx>
Acked-by: Christian Gromm <christian.gromm@xxxxxxxxxxxxx>
> ---
>  drivers/staging/most/hdm-dim2/dim2_hal.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/most/hdm-dim2/dim2_hal.c b/drivers/staging/most/hdm-dim2/dim2_hal.c
> index 01b7489..a54cf2c 100644
> --- a/drivers/staging/most/hdm-dim2/dim2_hal.c
> +++ b/drivers/staging/most/hdm-dim2/dim2_hal.c
> @@ -889,7 +889,7 @@ struct dim_ch_state_t *DIM_GetChannelState(struct dim_channel *ch,
>  		struct dim_ch_state_t *state_ptr)
>  {
>  	if (!ch || !state_ptr)
> -		return 0;
> +		return NULL;
>  
>  	state_ptr->ready = ch->state.level < 2;
>  	state_ptr->done_buffers = ch->done_sw_buffers_number;

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux