diff options
author | Lucas Tanure <tanure@linux.com> | 2016-02-15 19:11:51 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-02-20 14:09:14 -0800 |
commit | f45f40ad65336699757af948b81414c5999f1d48 (patch) | |
tree | bd96d36e9dc9d200a31ed2233925b693b5f2c3b4 /drivers/hwtracing | |
parent | 396ec3dea3d82d0a32906efe9803a8ef2647df51 (diff) | |
download | linux-f45f40ad65336699757af948b81414c5999f1d48.tar.gz linux-f45f40ad65336699757af948b81414c5999f1d48.tar.bz2 linux-f45f40ad65336699757af948b81414c5999f1d48.zip |
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: Lucas Tanure <tanure@linux.com>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hwtracing')
-rw-r--r-- | drivers/hwtracing/stm/core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hwtracing/stm/core.c b/drivers/hwtracing/stm/core.c index aef8ddb24451..cdec240bd6b6 100644 --- a/drivers/hwtracing/stm/core.c +++ b/drivers/hwtracing/stm/core.c @@ -233,7 +233,7 @@ static int find_free_channels(unsigned long *bitmap, unsigned int start, return -1; } -static unsigned int +static int stm_find_master_chan(struct stm_device *stm, unsigned int width, unsigned int *mstart, unsigned int mend, unsigned int *cstart, unsigned int cend) @@ -293,7 +293,7 @@ static int stm_output_assign(struct stm_device *stm, unsigned int width, goto unlock; ret = stm_find_master_chan(stm, width, &midx, mend, &cidx, cend); - if (ret) + if (ret < 0) goto unlock; output->master = midx; |