Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932670AbbFIHIJ (ORCPT ); Tue, 9 Jun 2015 03:08:09 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:47551 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752586AbbFIHIF (ORCPT ); Tue, 9 Jun 2015 03:08:05 -0400 X-AuditID: cbfee61a-f79516d000006302-53-557690d33b3d Date: Tue, 09 Jun 2015 09:07:22 +0200 From: Lukasz Majewski To: "Rafael J. Wysocki" Cc: Krzysztof Kozlowski , linux-samsung-soc@vger.kernel.org, linux-pm@vger.kernel.org, Viresh Kumar , linux-kernel@vger.kernel.org, Kukjin Kim , Shailendra Verma , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] cpufreq:exynos-cpufreq - Fix for memory leak in case SOC name does not match. Message-id: <20150609090722.43965fa0@amdc2363> In-reply-to: <8344426.BL3KyufMos@vostro.rjw.lan> References: <1432519780-2910-1-git-send-email-shailendra.capricorn@gmail.com> <20150525073149.GF9992@linux> <20150608103100.57f0473b@amdc2363> <8344426.BL3KyufMos@vostro.rjw.lan> Organization: SPRC Poland X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.10; x86_64-pc-linux-gnu) MIME-version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrFLMWRmVeSWpSXmKPExsVy+t9jQd3LE8pCDY4fVrV4/cLQov/xa2aL TY+vsVpc3jWHzeJz7xFGixnn9zFZnDl9idXi1ryZbBYbv3o4cHrsnHWX3WPTqk42jzvX9rB5 bF5S77HlajuLR9+WVYwenzfJBbBHcdmkpOZklqUW6dslcGUc2PieqeCWYMXHjevYGxiX8XYx cnJICJhI9ByYxAphi0lcuLeerYuRi0NIYDqjxJJHi1ggnDeMEtub1zOBVLEIqEo8PH2HDcRm E9CT+Hz3KVhcREBbYm7PKWYQm1lgG5PEv5dZILawQIrEvJcrwep5gepfP+5jAbE5BQwkZu85 xwixYBujxNZrbewgCX4BSYn2fz+YIU6ykzj3aQM7RLOgxI/J91ggFmhJbN7WxAphy0tsXvOW eQKj4CwkZbOQlM1CUraAkXkVo2hqQXJBcVJ6rqFecWJucWleul5yfu4mRnCMPJPawbiyweIQ owAHoxIPr4JyWagQa2JZcWXuIUYJDmYlEV6WLqAQb0piZVVqUX58UWlOavEhRmkOFiVx3pP5 PqFCAumJJanZqakFqUUwWSYOTqkGxvJPh/f9PKbgPN3CVZyj/kHPF58t0q3+NTF5r7UfHzz1 I3L9d8bDO9bPaVHXuZb/ae2C0MeCm8Likq5+CKqdzDa1dc2G+aekDFUtI/JOby/K84yRTGnm kmtZ92vCt8wq9k32jkzxO1Q+ue9vOXTy7zzBszw/X5XwL+4LTg3dOKmf+SnDNm/tMiWW4oxE Qy3mouJEAKhS33WNAgAA Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2438 Lines: 78 Hi Rafael, > On Monday, June 08, 2015 10:31:00 AM Lukasz Majewski wrote: > > Hi Viresh, > > > > > On 25-05-15, 07:39, Shailendra Verma wrote: > > > > During probe free the memory allocated to "exynos_info" in case > > > > of unknown SOC type. > > > > > > > > Signed-off-by: Shailendra Verma > > > > --- > > > > drivers/cpufreq/exynos-cpufreq.c | 6 ++++-- > > > > 1 file changed, 4 insertions(+), 2 deletions(-) > > > > > > > > diff --git a/drivers/cpufreq/exynos-cpufreq.c > > > > b/drivers/cpufreq/exynos-cpufreq.c index 82d2fbb..8682378 100644 > > > > --- a/drivers/cpufreq/exynos-cpufreq.c > > > > +++ b/drivers/cpufreq/exynos-cpufreq.c > > > > @@ -182,7 +182,7 @@ static int exynos_cpufreq_probe(struct > > > > platform_device *pdev) ret = > > > > exynos5250_cpufreq_init(exynos_info); } else { > > > > pr_err("%s: Unknown SoC type\n", __func__); > > > > - return -ENODEV; > > > > + ret = -ENODEV; > > > > } > > > > > > > > if (ret) > > > > @@ -190,12 +190,14 @@ static int exynos_cpufreq_probe(struct > > > > platform_device *pdev) > > > > if (exynos_info->set_freq == NULL) { > > > > dev_err(&pdev->dev, "No set_freq function > > > > (ERR)\n"); > > > > + ret = -EINVAL; > > > > goto err_vdd_arm; > > > > } > > > > > > > > arm_regulator = regulator_get(NULL, "vdd_arm"); > > > > if (IS_ERR(arm_regulator)) { > > > > dev_err(&pdev->dev, "failed to get resource > > > > vdd_arm\n"); > > > > + ret = -EINVAL; > > > > goto err_vdd_arm; > > > > } > > > > > > > > @@ -227,7 +229,7 @@ err_cpufreq_reg: > > > > regulator_put(arm_regulator); > > > > err_vdd_arm: > > > > kfree(exynos_info); > > > > - return -EINVAL; > > > > + return ret; > > > > } > > > > > > > > static struct platform_driver exynos_cpufreq_platdrv = { > > > > > > Acked-by: Viresh Kumar > > > > > > > Acked-by: Lukasz Majewski > > I'm assuming that it will go it through the Samsung tree. > > That would be the easiest way to proceed. Krzystof would you like to grab this patch? -- Best regards, Lukasz Majewski Samsung R&D Institute Poland (SRPOL) | Linux Platform Group -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/