summaryrefslogtreecommitdiffstats
path: root/drivers/soundwire
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2020-09-23 10:32:35 +0200
committerVinod Koul <vkoul@kernel.org>2020-09-23 12:04:48 +0200
commit5ec3215e56af8f7ce30c3d9d39029a85616713c0 (patch)
treef60305bef83968f8a83229879503446d0eabdd7b /drivers/soundwire
parentsoundwire: cadence: add data port test fail interrupt (diff)
downloadlinux-5ec3215e56af8f7ce30c3d9d39029a85616713c0.tar.xz
linux-5ec3215e56af8f7ce30c3d9d39029a85616713c0.zip
soundwire: remove an unnecessary NULL check
The "bus" pointer isn't NULL so the address to a non-zero offset in middle of "bus" cannot be NULL. Delete the NULL check. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/20200923083235.GB1454948@mwanda Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/soundwire')
-rw-r--r--drivers/soundwire/generic_bandwidth_allocation.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/soundwire/generic_bandwidth_allocation.c b/drivers/soundwire/generic_bandwidth_allocation.c
index 058cb9cd8547..0bdef38c9a30 100644
--- a/drivers/soundwire/generic_bandwidth_allocation.c
+++ b/drivers/soundwire/generic_bandwidth_allocation.c
@@ -344,15 +344,11 @@ static int sdw_select_row_col(struct sdw_bus *bus, int clk_freq)
static int sdw_compute_bus_params(struct sdw_bus *bus)
{
unsigned int max_dr_freq, curr_dr_freq = 0;
- struct sdw_master_prop *mstr_prop = NULL;
+ struct sdw_master_prop *mstr_prop = &bus->prop;
int i, clk_values, ret;
bool is_gear = false;
u32 *clk_buf;
- mstr_prop = &bus->prop;
- if (!mstr_prop)
- return -EINVAL;
-
if (mstr_prop->num_clk_gears) {
clk_values = mstr_prop->num_clk_gears;
clk_buf = mstr_prop->clk_gears;