On 7/21/2020 1:35 PM, Stephen Boyd wrote:
Quoting Akshu Agrawal (2020-07-19 22:04:59)
diff --git a/drivers/clk/x86/clk-fch.c b/drivers/clk/x86/clk-fch.c
index b252f0cf0628..d68bca7b213f 100644
--- a/drivers/clk/x86/clk-fch.c
+++ b/drivers/clk/x86/clk-fch.c
[...]
static int fch_clk_remove(struct platform_device *pdev)
  {
-       int i;
+       int i, clks;
+       struct fch_clk_data *fch_data;
- for (i = 0; i < ST_MAX_CLKS; i++)
+       fch_data = dev_get_platdata(&pdev->dev);
+
+       clks = (!fch_data->is_rv) ? ST_MAX_CLKS : RV_MAX_CLKS;
Useless parenthesis and negation, just write:

        num = fch_data->is_rv ? RV_MAX_CLKS : ST_MAX_CLKS;

Sure, including in the next patch set.

Thanks,

Akshu


+
+       for (i = 0; i < clks; i++)
                 clk_hw_unregister(hws[i]);
+
         return 0;
  }

Reply via email to