Re: [PATCH v2 1/2] mfd: intel_quark_i2c_gpio: remove clock tree on error path

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

 



On 02/19, Andy Shevchenko wrote:
> There is a potential resource leak in case when ->probe() fails. We have to
> unregister and remove clock tree which is done here.
> 
> This is a follow up to previously pushed commit c4726abce63b ("mfd:
> intel_quark_i2c_gpio: Use clkdev_create()") that prevents double free() when
> clkdev_drop() followed by kfree() in devm_kcalloc() release stage.
> 
> I leave Fixes tag here, but the backporting will require to backport the commit
> c4726abce63b ("mfd: intel_quark_i2c_gpio: Use clkdev_create()") first.
> 
> Fixes: 60ae5b9f5cdd (mfd: intel_quark_i2c_gpio: Add Intel Quark X1000 I2C-GPIO MFD Driver)
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
> ---

Both look fine to me. You may also want to use
devm_clk_register() instead so that cleanup is easier.

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]