diff mbox series

[1/3] memory: Exynos5422: minor fixes in DMC

Message ID 20190906101344.3535-2-l.luba@partner.samsung.com (mailing list archive)
State Not Applicable, archived
Headers show
Series [1/3] memory: Exynos5422: minor fixes in DMC | expand

Commit Message

Lukasz Luba Sept. 6, 2019, 10:13 a.m. UTC
Small fixes captured by static analyzes.

Signed-off-by: Lukasz Luba <l.luba@partner.samsung.com>
---
 drivers/memory/samsung/exynos5422-dmc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Krzysztof Kozlowski Sept. 6, 2019, 10:51 a.m. UTC | #1
On Fri, 6 Sep 2019 at 12:14, Lukasz Luba <l.luba@partner.samsung.com> wrote:
>
> Small fixes captured by static analyzes.

Explain please what are the errors being fixed. Additionally error
message from tool might be useful.

Also:
Reported-by: Krzysztof Kozlowski <krzk@kernel.org>

Best regards,
Krzysztof

> Signed-off-by: Lukasz Luba <l.luba@partner.samsung.com>
> ---
>  drivers/memory/samsung/exynos5422-dmc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/memory/samsung/exynos5422-dmc.c b/drivers/memory/samsung/exynos5422-dmc.c
> index 8c2ec29a7d57..a809fa997c03 100644
> --- a/drivers/memory/samsung/exynos5422-dmc.c
> +++ b/drivers/memory/samsung/exynos5422-dmc.c
> @@ -269,7 +269,7 @@ static int exynos5_init_freq_table(struct exynos5_dmc *dmc,
>         return 0;
>
>  err_free_tables:
> -       kfree(dmc->opp);
> +       devm_kfree(dmc->dev, dmc->opp);
>  err_opp:
>         dev_pm_opp_of_remove_table(dmc->dev);
>
> @@ -732,7 +732,7 @@ static struct devfreq_dev_profile exynos5_dmc_df_profile = {
>   * statistics engine which supports only registered values. Thus, some alignment
>   * must be made.
>   */
> -unsigned long
> +static unsigned long
>  exynos5_dmc_align_init_freq(struct exynos5_dmc *dmc,
>                             unsigned long bootloader_init_freq)
>  {
> --
> 2.17.1
>
Lukasz Luba Sept. 6, 2019, 11:43 a.m. UTC | #2
On 9/6/19 12:51 PM, Krzysztof Kozlowski wrote:
> On Fri, 6 Sep 2019 at 12:14, Lukasz Luba <l.luba@partner.samsung.com> wrote:
>>
>> Small fixes captured by static analyzes.
> 
> Explain please what are the errors being fixed. Additionally error
> message from tool might be useful.
> 
> Also:
> Reported-by: Krzysztof Kozlowski <krzk@kernel.org>

OK, I will add it in the next version.
My apologies for missing your name there.

Regards,
Lukasz
diff mbox series

Patch

diff --git a/drivers/memory/samsung/exynos5422-dmc.c b/drivers/memory/samsung/exynos5422-dmc.c
index 8c2ec29a7d57..a809fa997c03 100644
--- a/drivers/memory/samsung/exynos5422-dmc.c
+++ b/drivers/memory/samsung/exynos5422-dmc.c
@@ -269,7 +269,7 @@  static int exynos5_init_freq_table(struct exynos5_dmc *dmc,
 	return 0;
 
 err_free_tables:
-	kfree(dmc->opp);
+	devm_kfree(dmc->dev, dmc->opp);
 err_opp:
 	dev_pm_opp_of_remove_table(dmc->dev);
 
@@ -732,7 +732,7 @@  static struct devfreq_dev_profile exynos5_dmc_df_profile = {
  * statistics engine which supports only registered values. Thus, some alignment
  * must be made.
  */
-unsigned long
+static unsigned long
 exynos5_dmc_align_init_freq(struct exynos5_dmc *dmc,
 			    unsigned long bootloader_init_freq)
 {