* [PATCH 1/1] nvmem: imx-ocotp: fix value check in imx_ocotp_probe()
@ 2023-07-27 17:04 Yuanjun Gong
2023-07-27 17:24 ` Greg Kroah-Hartman
0 siblings, 1 reply; 2+ messages in thread
From: Yuanjun Gong @ 2023-07-27 17:04 UTC (permalink / raw)
To: NXP Linux Team, Lucas Stach, Greg Kroah-Hartman, linux-kernel
Cc: Yuanjun Gong
in imx_ocotp_probe(), check the return value of clk_prepare_enable()
and return the error code if clk_prepare_enable() returns an
unexpected value.
Fixes: c33c585f1b3a ("nvmem: imx-ocotp: reset error status on probe")
Signed-off-by: Yuanjun Gong <ruc_gongyuanjun@163.com>
---
drivers/nvmem/imx-ocotp.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/nvmem/imx-ocotp.c b/drivers/nvmem/imx-ocotp.c
index ab556c011f3e..c4d604256862 100644
--- a/drivers/nvmem/imx-ocotp.c
+++ b/drivers/nvmem/imx-ocotp.c
@@ -600,6 +600,7 @@ static int imx_ocotp_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev;
struct ocotp_priv *priv;
struct nvmem_device *nvmem;
+ int ret;
priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
if (!priv)
@@ -623,7 +624,9 @@ static int imx_ocotp_probe(struct platform_device *pdev)
priv->config = &imx_ocotp_nvmem_config;
- clk_prepare_enable(priv->clk);
+ ret = clk_prepare_enable(priv->clk);
+ if (ret)
+ return ret;
imx_ocotp_clr_err_if_set(priv);
clk_disable_unprepare(priv->clk);
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/1] nvmem: imx-ocotp: fix value check in imx_ocotp_probe()
2023-07-27 17:04 [PATCH 1/1] nvmem: imx-ocotp: fix value check in imx_ocotp_probe() Yuanjun Gong
@ 2023-07-27 17:24 ` Greg Kroah-Hartman
0 siblings, 0 replies; 2+ messages in thread
From: Greg Kroah-Hartman @ 2023-07-27 17:24 UTC (permalink / raw)
To: Yuanjun Gong; +Cc: NXP Linux Team, Lucas Stach, linux-kernel
On Fri, Jul 28, 2023 at 01:04:14AM +0800, Yuanjun Gong wrote:
> in imx_ocotp_probe(), check the return value of clk_prepare_enable()
> and return the error code if clk_prepare_enable() returns an
> unexpected value.
>
> Fixes: c33c585f1b3a ("nvmem: imx-ocotp: reset error status on probe")
> Signed-off-by: Yuanjun Gong <ruc_gongyuanjun@163.com>
Why isn't this also properly tagged to go to the stable kernel releases?
I need to write a bot to catch these things...
thanks,
greg k-h
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-07-27 17:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-27 17:04 [PATCH 1/1] nvmem: imx-ocotp: fix value check in imx_ocotp_probe() Yuanjun Gong
2023-07-27 17:24 ` Greg Kroah-Hartman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox