Re: [PATCH 1/2] DSPBRIDGE: remove dependency of mpu freq

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dasgupta, Romit had written, on 01/21/2010 01:40 AM, the following:
Romit Dasgupta wrote:
diff --git a/arch/arm/mach-omap2/dspbridge.c b/arch/arm/mach-omap2/dspbridge.c
+
 static int __init dspbridge_init(void)
 {
 	struct platform_device *pdev;
@@ -48,6 +65,10 @@ static int __init dspbridge_init(void)
 	if (!pdev)
 		goto err_out;
+ err = get_opp_table(pdata);
+	if (err)
+		goto err_out;
+
 	err = platform_device_add_data(pdev, pdata, sizeof(*pdata));
 	if (err)
 		goto err_out;
@@ -60,6 +81,10 @@ static int __init dspbridge_init(void)
 	return 0;
err_out:
+	kfree(pdata->mpu_speeds);
+	kfree(pdata->dsp_freq_table);
Are we sure that pdata->dsp_freq_table is NULL before initialization?
Looking at your second part of the patch. You seem to invoke kfree for
pdata->dsp_freq_table even if pdata->dsp_freq_table is not allocated.
So my question is :
missed the last part of the mail. If pdata->dsp_freq_table is NULL to start
with. This is ok. Otherwise this needs to be changed.
;) yep it is NULL to start with as the same file passes pdata from:
static struct dspbridge_platform_data dspbridge_pdata __initdata
and kfree is NULL safe :D.

--
Regards,
Nishanth Menon
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux