* [PATCH -next] i2c: meson: fix missing clk_disable_unprepare() on error in meson_i2c_probe()
@ 2022-04-21 9:00 ` Yang Yingliang
0 siblings, 0 replies; 9+ messages in thread
From: Yang Yingliang @ 2022-04-21 9:00 UTC (permalink / raw)
To: linux-kernel, linux-amlogic, linux-arm-kernel, linux-i2c
Cc: wsa, narmstrong, tanure
Fix the missing clk_disable_unprepare() before return
from meson_i2c_probe() in the error handling case.
Fixes: a57f9b4dd6f5 ("i2c: meson: Use 50% duty cycle for I2C clock")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
drivers/i2c/busses/i2c-meson.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/i2c/busses/i2c-meson.c b/drivers/i2c/busses/i2c-meson.c
index 50dab123380a..195a9716da31 100644
--- a/drivers/i2c/busses/i2c-meson.c
+++ b/drivers/i2c/busses/i2c-meson.c
@@ -520,8 +520,10 @@ static int meson_i2c_probe(struct platform_device *pdev)
meson_i2c_set_mask(i2c, REG_SLAVE_ADDR,
REG_SLV_SDA_FILTER_MASK | REG_SLV_SCL_FILTER_MASK, 0);
- if (!i2c->data->set_clk_div)
+ if (!i2c->data->set_clk_div) {
+ clk_disable_unprepare(i2c->clk);
return -EINVAL;
+ }
i2c->data->set_clk_div(i2c, timings.bus_freq_hz);
ret = i2c_add_adapter(&i2c->adap);
--
2.25.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH -next] i2c: meson: fix missing clk_disable_unprepare() on error in meson_i2c_probe()
@ 2022-04-21 9:00 ` Yang Yingliang
0 siblings, 0 replies; 9+ messages in thread
From: Yang Yingliang @ 2022-04-21 9:00 UTC (permalink / raw)
To: linux-kernel, linux-amlogic, linux-arm-kernel, linux-i2c
Cc: wsa, narmstrong, tanure
Fix the missing clk_disable_unprepare() before return
from meson_i2c_probe() in the error handling case.
Fixes: a57f9b4dd6f5 ("i2c: meson: Use 50% duty cycle for I2C clock")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
drivers/i2c/busses/i2c-meson.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/i2c/busses/i2c-meson.c b/drivers/i2c/busses/i2c-meson.c
index 50dab123380a..195a9716da31 100644
--- a/drivers/i2c/busses/i2c-meson.c
+++ b/drivers/i2c/busses/i2c-meson.c
@@ -520,8 +520,10 @@ static int meson_i2c_probe(struct platform_device *pdev)
meson_i2c_set_mask(i2c, REG_SLAVE_ADDR,
REG_SLV_SDA_FILTER_MASK | REG_SLV_SCL_FILTER_MASK, 0);
- if (!i2c->data->set_clk_div)
+ if (!i2c->data->set_clk_div) {
+ clk_disable_unprepare(i2c->clk);
return -EINVAL;
+ }
i2c->data->set_clk_div(i2c, timings.bus_freq_hz);
ret = i2c_add_adapter(&i2c->adap);
--
2.25.1
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH -next] i2c: meson: fix missing clk_disable_unprepare() on error in meson_i2c_probe()
@ 2022-04-21 9:00 ` Yang Yingliang
0 siblings, 0 replies; 9+ messages in thread
From: Yang Yingliang @ 2022-04-21 9:00 UTC (permalink / raw)
To: linux-kernel, linux-amlogic, linux-arm-kernel, linux-i2c
Cc: wsa, narmstrong, tanure
Fix the missing clk_disable_unprepare() before return
from meson_i2c_probe() in the error handling case.
Fixes: a57f9b4dd6f5 ("i2c: meson: Use 50% duty cycle for I2C clock")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
drivers/i2c/busses/i2c-meson.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/i2c/busses/i2c-meson.c b/drivers/i2c/busses/i2c-meson.c
index 50dab123380a..195a9716da31 100644
--- a/drivers/i2c/busses/i2c-meson.c
+++ b/drivers/i2c/busses/i2c-meson.c
@@ -520,8 +520,10 @@ static int meson_i2c_probe(struct platform_device *pdev)
meson_i2c_set_mask(i2c, REG_SLAVE_ADDR,
REG_SLV_SDA_FILTER_MASK | REG_SLV_SCL_FILTER_MASK, 0);
- if (!i2c->data->set_clk_div)
+ if (!i2c->data->set_clk_div) {
+ clk_disable_unprepare(i2c->clk);
return -EINVAL;
+ }
i2c->data->set_clk_div(i2c, timings.bus_freq_hz);
ret = i2c_add_adapter(&i2c->adap);
--
2.25.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH -next] i2c: meson: fix missing clk_disable_unprepare() on error in meson_i2c_probe()
2022-04-21 9:00 ` Yang Yingliang
(?)
@ 2022-04-21 10:04 ` Neil Armstrong
-1 siblings, 0 replies; 9+ messages in thread
From: Neil Armstrong @ 2022-04-21 10:04 UTC (permalink / raw)
To: Yang Yingliang, linux-kernel, linux-amlogic, linux-arm-kernel, linux-i2c
Cc: wsa, tanure
On 21/04/2022 11:00, Yang Yingliang wrote:
> Fix the missing clk_disable_unprepare() before return
> from meson_i2c_probe() in the error handling case.
>
> Fixes: a57f9b4dd6f5 ("i2c: meson: Use 50% duty cycle for I2C clock")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
> ---
> drivers/i2c/busses/i2c-meson.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/i2c/busses/i2c-meson.c b/drivers/i2c/busses/i2c-meson.c
> index 50dab123380a..195a9716da31 100644
> --- a/drivers/i2c/busses/i2c-meson.c
> +++ b/drivers/i2c/busses/i2c-meson.c
> @@ -520,8 +520,10 @@ static int meson_i2c_probe(struct platform_device *pdev)
> meson_i2c_set_mask(i2c, REG_SLAVE_ADDR,
> REG_SLV_SDA_FILTER_MASK | REG_SLV_SCL_FILTER_MASK, 0);
>
> - if (!i2c->data->set_clk_div)
> + if (!i2c->data->set_clk_div) {
> + clk_disable_unprepare(i2c->clk);
> return -EINVAL;
> + }
> i2c->data->set_clk_div(i2c, timings.bus_freq_hz);
>
> ret = i2c_add_adapter(&i2c->adap);
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH -next] i2c: meson: fix missing clk_disable_unprepare() on error in meson_i2c_probe()
@ 2022-04-21 10:04 ` Neil Armstrong
0 siblings, 0 replies; 9+ messages in thread
From: Neil Armstrong @ 2022-04-21 10:04 UTC (permalink / raw)
To: Yang Yingliang, linux-kernel, linux-amlogic, linux-arm-kernel, linux-i2c
Cc: wsa, tanure
On 21/04/2022 11:00, Yang Yingliang wrote:
> Fix the missing clk_disable_unprepare() before return
> from meson_i2c_probe() in the error handling case.
>
> Fixes: a57f9b4dd6f5 ("i2c: meson: Use 50% duty cycle for I2C clock")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
> ---
> drivers/i2c/busses/i2c-meson.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/i2c/busses/i2c-meson.c b/drivers/i2c/busses/i2c-meson.c
> index 50dab123380a..195a9716da31 100644
> --- a/drivers/i2c/busses/i2c-meson.c
> +++ b/drivers/i2c/busses/i2c-meson.c
> @@ -520,8 +520,10 @@ static int meson_i2c_probe(struct platform_device *pdev)
> meson_i2c_set_mask(i2c, REG_SLAVE_ADDR,
> REG_SLV_SDA_FILTER_MASK | REG_SLV_SCL_FILTER_MASK, 0);
>
> - if (!i2c->data->set_clk_div)
> + if (!i2c->data->set_clk_div) {
> + clk_disable_unprepare(i2c->clk);
> return -EINVAL;
> + }
> i2c->data->set_clk_div(i2c, timings.bus_freq_hz);
>
> ret = i2c_add_adapter(&i2c->adap);
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH -next] i2c: meson: fix missing clk_disable_unprepare() on error in meson_i2c_probe()
@ 2022-04-21 10:04 ` Neil Armstrong
0 siblings, 0 replies; 9+ messages in thread
From: Neil Armstrong @ 2022-04-21 10:04 UTC (permalink / raw)
To: Yang Yingliang, linux-kernel, linux-amlogic, linux-arm-kernel, linux-i2c
Cc: wsa, tanure
On 21/04/2022 11:00, Yang Yingliang wrote:
> Fix the missing clk_disable_unprepare() before return
> from meson_i2c_probe() in the error handling case.
>
> Fixes: a57f9b4dd6f5 ("i2c: meson: Use 50% duty cycle for I2C clock")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
> ---
> drivers/i2c/busses/i2c-meson.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/i2c/busses/i2c-meson.c b/drivers/i2c/busses/i2c-meson.c
> index 50dab123380a..195a9716da31 100644
> --- a/drivers/i2c/busses/i2c-meson.c
> +++ b/drivers/i2c/busses/i2c-meson.c
> @@ -520,8 +520,10 @@ static int meson_i2c_probe(struct platform_device *pdev)
> meson_i2c_set_mask(i2c, REG_SLAVE_ADDR,
> REG_SLV_SDA_FILTER_MASK | REG_SLV_SCL_FILTER_MASK, 0);
>
> - if (!i2c->data->set_clk_div)
> + if (!i2c->data->set_clk_div) {
> + clk_disable_unprepare(i2c->clk);
> return -EINVAL;
> + }
> i2c->data->set_clk_div(i2c, timings.bus_freq_hz);
>
> ret = i2c_add_adapter(&i2c->adap);
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH -next] i2c: meson: fix missing clk_disable_unprepare() on error in meson_i2c_probe()
2022-04-21 9:00 ` Yang Yingliang
(?)
@ 2022-05-04 20:38 ` Wolfram Sang
-1 siblings, 0 replies; 9+ messages in thread
From: Wolfram Sang @ 2022-05-04 20:38 UTC (permalink / raw)
To: Yang Yingliang
Cc: linux-kernel, linux-amlogic, linux-arm-kernel, linux-i2c,
narmstrong, tanure
[-- Attachment #1: Type: text/plain, Size: 393 bytes --]
On Thu, Apr 21, 2022 at 05:00:42PM +0800, Yang Yingliang wrote:
> Fix the missing clk_disable_unprepare() before return
> from meson_i2c_probe() in the error handling case.
>
> Fixes: a57f9b4dd6f5 ("i2c: meson: Use 50% duty cycle for I2C clock")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Applied to for-next, thanks!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH -next] i2c: meson: fix missing clk_disable_unprepare() on error in meson_i2c_probe()
@ 2022-05-04 20:38 ` Wolfram Sang
0 siblings, 0 replies; 9+ messages in thread
From: Wolfram Sang @ 2022-05-04 20:38 UTC (permalink / raw)
To: Yang Yingliang
Cc: linux-kernel, linux-amlogic, linux-arm-kernel, linux-i2c,
narmstrong, tanure
[-- Attachment #1.1: Type: text/plain, Size: 393 bytes --]
On Thu, Apr 21, 2022 at 05:00:42PM +0800, Yang Yingliang wrote:
> Fix the missing clk_disable_unprepare() before return
> from meson_i2c_probe() in the error handling case.
>
> Fixes: a57f9b4dd6f5 ("i2c: meson: Use 50% duty cycle for I2C clock")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Applied to for-next, thanks!
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 167 bytes --]
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH -next] i2c: meson: fix missing clk_disable_unprepare() on error in meson_i2c_probe()
@ 2022-05-04 20:38 ` Wolfram Sang
0 siblings, 0 replies; 9+ messages in thread
From: Wolfram Sang @ 2022-05-04 20:38 UTC (permalink / raw)
To: Yang Yingliang
Cc: linux-kernel, linux-amlogic, linux-arm-kernel, linux-i2c,
narmstrong, tanure
[-- Attachment #1.1: Type: text/plain, Size: 393 bytes --]
On Thu, Apr 21, 2022 at 05:00:42PM +0800, Yang Yingliang wrote:
> Fix the missing clk_disable_unprepare() before return
> from meson_i2c_probe() in the error handling case.
>
> Fixes: a57f9b4dd6f5 ("i2c: meson: Use 50% duty cycle for I2C clock")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Applied to for-next, thanks!
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2022-05-04 20:39 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-21 9:00 [PATCH -next] i2c: meson: fix missing clk_disable_unprepare() on error in meson_i2c_probe() Yang Yingliang
2022-04-21 9:00 ` Yang Yingliang
2022-04-21 9:00 ` Yang Yingliang
2022-04-21 10:04 ` Neil Armstrong
2022-04-21 10:04 ` Neil Armstrong
2022-04-21 10:04 ` Neil Armstrong
2022-05-04 20:38 ` Wolfram Sang
2022-05-04 20:38 ` Wolfram Sang
2022-05-04 20:38 ` Wolfram Sang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.