提交 f45f40ad 编写于 作者: L Lucas Tanure 提交者: Greg Kroah-Hartman

stm class: Use a signed return type for stm_find_master_chan

The return type "unsigned int" was used by the stm_find_master_chan function
despite of the aspect that it will eventually return a negative error code.

Done with the help of Coccinelle.
Signed-off-by: NLucas Tanure <tanure@linux.com>
Signed-off-by: NAlexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 396ec3de
...@@ -233,7 +233,7 @@ static int find_free_channels(unsigned long *bitmap, unsigned int start, ...@@ -233,7 +233,7 @@ static int find_free_channels(unsigned long *bitmap, unsigned int start,
return -1; return -1;
} }
static unsigned int static int
stm_find_master_chan(struct stm_device *stm, unsigned int width, stm_find_master_chan(struct stm_device *stm, unsigned int width,
unsigned int *mstart, unsigned int mend, unsigned int *mstart, unsigned int mend,
unsigned int *cstart, unsigned int cend) unsigned int *cstart, unsigned int cend)
...@@ -293,7 +293,7 @@ static int stm_output_assign(struct stm_device *stm, unsigned int width, ...@@ -293,7 +293,7 @@ static int stm_output_assign(struct stm_device *stm, unsigned int width,
goto unlock; goto unlock;
ret = stm_find_master_chan(stm, width, &midx, mend, &cidx, cend); ret = stm_find_master_chan(stm, width, &midx, mend, &cidx, cend);
if (ret) if (ret < 0)
goto unlock; goto unlock;
output->master = midx; output->master = midx;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册