soundwire: cadence_master: check the number of bidir PDIs
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Wed, 22 May 2019 19:47:28 +0000 (14:47 -0500)
committerVinod Koul <vkoul@kernel.org>
Mon, 27 May 2019 05:23:00 +0000 (10:53 +0530)
commit2d35526df9b17db9a1e04d8eda538a44541dde66
treee366322d013895a6dc2d3a5f22d9a36a62006654
parenta78b32d9c36bd25f96a1fe2e610712e119c86afb
soundwire: cadence_master: check the number of bidir PDIs

There is an assumption that the first two PDIs are reserved for Bulk,
so we need to make sure the number of bidir PDIs is indeed larger than
two. If the configuration provided is incorrect, this could lead to
allocating a huge amount of memory.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/soundwire/cadence_master.c