* [PATCH -next] mtd: rawnand: arasan: Fix missing clk_disable_unprepare() on error in anfc_probe()
@ 2021-06-16 4:06 Zou Wei
2021-06-18 7:27 ` Miquel Raynal
0 siblings, 1 reply; 3+ messages in thread
From: Zou Wei @ 2021-06-16 4:06 UTC (permalink / raw)
To: miquel.raynal, nagasure, richard, vigneshr
Cc: linux-mtd, linux-kernel, Zou Wei
Fix the missing clk_disable_unprepare() before return
from anfc_probe() in the error handling case.
Fixes: 61622f6791a1 ("mtd: rawnand: arasan: Use the right DMA mask")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zou Wei <zou_wei@huawei.com>
---
drivers/mtd/nand/raw/arasan-nand-controller.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mtd/nand/raw/arasan-nand-controller.c b/drivers/mtd/nand/raw/arasan-nand-controller.c
index 8317d97..9cbcc69 100644
--- a/drivers/mtd/nand/raw/arasan-nand-controller.c
+++ b/drivers/mtd/nand/raw/arasan-nand-controller.c
@@ -1452,7 +1452,7 @@ static int anfc_probe(struct platform_device *pdev)
ret = dma_set_mask(&pdev->dev, DMA_BIT_MASK(64));
if (ret)
- return ret;
+ goto disable_bus_clk;
ret = anfc_parse_cs(nfc);
if (ret)
--
2.6.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH -next] mtd: rawnand: arasan: Fix missing clk_disable_unprepare() on error in anfc_probe()
2021-06-16 4:06 [PATCH -next] mtd: rawnand: arasan: Fix missing clk_disable_unprepare() on error in anfc_probe() Zou Wei
@ 2021-06-18 7:27 ` Miquel Raynal
2021-06-18 12:35 ` Samuel Zou
0 siblings, 1 reply; 3+ messages in thread
From: Miquel Raynal @ 2021-06-18 7:27 UTC (permalink / raw)
To: Zou Wei; +Cc: nagasure, richard, vigneshr, linux-mtd, linux-kernel
Hi Zou,
Zou Wei <zou_wei@huawei.com> wrote on Wed, 16 Jun 2021 12:06:44 +0800:
> Fix the missing clk_disable_unprepare() before return
> from anfc_probe() in the error handling case.
>
> Fixes: 61622f6791a1 ("mtd: rawnand: arasan: Use the right DMA mask")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Zou Wei <zou_wei@huawei.com>
Thanks for the patch, 61622f6791a1 being problematic because of the
mask not being correctly declared I prefer to fix this patch inline and
if you don't mind I'll include the goto change as well.
> ---
> drivers/mtd/nand/raw/arasan-nand-controller.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mtd/nand/raw/arasan-nand-controller.c b/drivers/mtd/nand/raw/arasan-nand-controller.c
> index 8317d97..9cbcc69 100644
> --- a/drivers/mtd/nand/raw/arasan-nand-controller.c
> +++ b/drivers/mtd/nand/raw/arasan-nand-controller.c
> @@ -1452,7 +1452,7 @@ static int anfc_probe(struct platform_device *pdev)
>
> ret = dma_set_mask(&pdev->dev, DMA_BIT_MASK(64));
> if (ret)
> - return ret;
> + goto disable_bus_clk;
>
> ret = anfc_parse_cs(nfc);
> if (ret)
Thanks,
Miquèl
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH -next] mtd: rawnand: arasan: Fix missing clk_disable_unprepare() on error in anfc_probe()
2021-06-18 7:27 ` Miquel Raynal
@ 2021-06-18 12:35 ` Samuel Zou
0 siblings, 0 replies; 3+ messages in thread
From: Samuel Zou @ 2021-06-18 12:35 UTC (permalink / raw)
To: Miquel Raynal; +Cc: nagasure, richard, vigneshr, linux-mtd, linux-kernel
Hi Miquel,
Thanks for your review, and it's OK include the goto change.
On 2021/6/18 15:27, Miquel Raynal wrote:
> Hi Zou,
>
> Zou Wei <zou_wei@huawei.com> wrote on Wed, 16 Jun 2021 12:06:44 +0800:
>
>> Fix the missing clk_disable_unprepare() before return
>> from anfc_probe() in the error handling case.
>>
>> Fixes: 61622f6791a1 ("mtd: rawnand: arasan: Use the right DMA mask")
>> Reported-by: Hulk Robot <hulkci@huawei.com>
>> Signed-off-by: Zou Wei <zou_wei@huawei.com>
>
> Thanks for the patch, 61622f6791a1 being problematic because of the
> mask not being correctly declared I prefer to fix this patch inline and
> if you don't mind I'll include the goto change as well.
>
>> ---
>> drivers/mtd/nand/raw/arasan-nand-controller.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/mtd/nand/raw/arasan-nand-controller.c b/drivers/mtd/nand/raw/arasan-nand-controller.c
>> index 8317d97..9cbcc69 100644
>> --- a/drivers/mtd/nand/raw/arasan-nand-controller.c
>> +++ b/drivers/mtd/nand/raw/arasan-nand-controller.c
>> @@ -1452,7 +1452,7 @@ static int anfc_probe(struct platform_device *pdev)
>>
>> ret = dma_set_mask(&pdev->dev, DMA_BIT_MASK(64));
>> if (ret)
>> - return ret;
>> + goto disable_bus_clk;
>>
>> ret = anfc_parse_cs(nfc);
>> if (ret)
>
> Thanks,
> Miquèl
> .
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-06-18 12:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-16 4:06 [PATCH -next] mtd: rawnand: arasan: Fix missing clk_disable_unprepare() on error in anfc_probe() Zou Wei
2021-06-18 7:27 ` Miquel Raynal
2021-06-18 12:35 ` Samuel Zou
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).