]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
soundwire: remove an unnecessary NULL check
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 23 Sep 2020 08:32:35 +0000 (11:32 +0300)
committerVinod Koul <vkoul@kernel.org>
Wed, 23 Sep 2020 10:04:48 +0000 (15:34 +0530)
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>
drivers/soundwire/generic_bandwidth_allocation.c

index 058cb9cd8547a8369de6a19685406e474c453fbc..0bdef38c9a301f92c55d83781bcd02ea0206c676 100644 (file)
@@ -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;