From: Tomas Melin Date: Sun, 9 Aug 2015 14:08:41 +0000 (+0300) Subject: staging/most: fix return value for DIM_GetChannelState X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=910bf1efe6f7f74b10e918768ddea3ad8b863f8b;p=linux-beck.git staging/most: fix return value for DIM_GetChannelState Return NULL instead of 0 for invalid input. Signed-off-by: Tomas Melin Acked-by: Christian Gromm Signed-off-by: Andrey Shvetsov Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/most/hdm-dim2/dim2_hal.c b/drivers/staging/most/hdm-dim2/dim2_hal.c index 01b748944ee4..a54cf2cedac3 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;