Re: [PATCH 09/17] soundwire: stream: remove unnecessary variable initializations

2019-08-06 Thread Pierre-Louis Bossart
On 8/6/19 10:31 AM, Cezary Rojewski wrote: On 2019-08-06 02:55, Pierre-Louis Bossart wrote: @@ -1493,6 +1493,11 @@ static int _sdw_prepare_stream(struct sdw_stream_runtime *stream)   }   } +    if (!bus) { +    pr_err("Configuration error in %s\n", __func__); +    return

Re: [PATCH 09/17] soundwire: stream: remove unnecessary variable initializations

2019-08-06 Thread Cezary Rojewski
On 2019-08-06 02:55, Pierre-Louis Bossart wrote: @@ -1493,6 +1493,11 @@ static int _sdw_prepare_stream(struct sdw_stream_runtime *stream) } } + if (!bus) { + pr_err("Configuration error in %s\n", __func__); + return -EINVAL; + } +

[PATCH 09/17] soundwire: stream: remove unnecessary variable initializations

2019-08-05 Thread Pierre-Louis Bossart
A number of variables don't need to be initialized. In a couple of cases where we loop on a list of runtimes, the code handling of the 'bus' variable leads to warnings that it may not be initialized. Add a specific error case to trap such cases. Signed-off-by: Pierre-Louis Bossart ---