dmaengine: dmatest: Return boolean result directly in filter()

There is no need to have a conditional for boolean expression when
function returns bool. Drop unnecessary code and return boolean
result directly.

While at it, drop unneeded casting from void *.

Cc: Vladimir Murzin <[email protected]>
Signed-off-by: Andy Shevchenko <[email protected]>
Tested-by: Peter Ujfalusi <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Vinod Koul <[email protected]>
This commit is contained in:
Andy Shevchenko authored and Vinod Koul committed 2020-09-22 20:18:41 +05:30
1 parent b28de385b7
commit da75ba2482
1 file changed
+1 -7
+1 -7
View File
@@ -1058,13 +1058,7 @@ static int dmatest_add_channel(struct dmatest_info *info,
static bool filter(struct dma_chan *chan, void *param)
{
struct dmatest_params *params = param;
if (!dmatest_match_channel(params, chan) ||
!dmatest_match_device(params, chan->device))
return false;
else
return true;
return dmatest_match_channel(param, chan) && dmatest_match_device(param, chan->device);
}
static void request_channels(struct dmatest_info *info,