All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] i3c: master: Fix error return in cdns_i3c_master_probe()
@ 2020-09-11  3:33 ` Jing Xiangfeng
  0 siblings, 0 replies; 4+ messages in thread
From: Jing Xiangfeng @ 2020-09-11  3:33 UTC (permalink / raw
  To: pgaj, bbrezillon, boris.brezillon; +Cc: linux-i3c, linux-kernel, jingxiangfeng

Fix to return negative error code -ENOMEM from the error handling
case instead of 0.

Signed-off-by: Jing Xiangfeng <jingxiangfeng@huawei.com>
---
 drivers/i3c/master/i3c-master-cdns.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/i3c/master/i3c-master-cdns.c b/drivers/i3c/master/i3c-master-cdns.c
index 3fee8bd7fe20..3f2226928fe0 100644
--- a/drivers/i3c/master/i3c-master-cdns.c
+++ b/drivers/i3c/master/i3c-master-cdns.c
@@ -1635,8 +1635,10 @@ static int cdns_i3c_master_probe(struct platform_device *pdev)
 	master->ibi.slots = devm_kcalloc(&pdev->dev, master->ibi.num_slots,
 					 sizeof(*master->ibi.slots),
 					 GFP_KERNEL);
-	if (!master->ibi.slots)
+	if (!master->ibi.slots) {
+		ret = -ENOMEM;
 		goto err_disable_sysclk;
+	}
 
 	writel(IBIR_THR(1), master->regs + CMD_IBI_THR_CTRL);
 	writel(MST_INT_IBIR_THR, master->regs + MST_IER);
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] i3c: master: Fix error return in cdns_i3c_master_probe()
@ 2020-09-11  3:33 ` Jing Xiangfeng
  0 siblings, 0 replies; 4+ messages in thread
From: Jing Xiangfeng @ 2020-09-11  3:33 UTC (permalink / raw
  To: pgaj, bbrezillon, boris.brezillon; +Cc: linux-i3c, linux-kernel, jingxiangfeng

Fix to return negative error code -ENOMEM from the error handling
case instead of 0.

Signed-off-by: Jing Xiangfeng <jingxiangfeng@huawei.com>
---
 drivers/i3c/master/i3c-master-cdns.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/i3c/master/i3c-master-cdns.c b/drivers/i3c/master/i3c-master-cdns.c
index 3fee8bd7fe20..3f2226928fe0 100644
--- a/drivers/i3c/master/i3c-master-cdns.c
+++ b/drivers/i3c/master/i3c-master-cdns.c
@@ -1635,8 +1635,10 @@ static int cdns_i3c_master_probe(struct platform_device *pdev)
 	master->ibi.slots = devm_kcalloc(&pdev->dev, master->ibi.num_slots,
 					 sizeof(*master->ibi.slots),
 					 GFP_KERNEL);
-	if (!master->ibi.slots)
+	if (!master->ibi.slots) {
+		ret = -ENOMEM;
 		goto err_disable_sysclk;
+	}
 
 	writel(IBIR_THR(1), master->regs + CMD_IBI_THR_CTRL);
 	writel(MST_INT_IBIR_THR, master->regs + MST_IER);
-- 
2.17.1


-- 
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] i3c: master: Fix error return in cdns_i3c_master_probe()
  2020-09-11  3:33 ` Jing Xiangfeng
@ 2020-10-07 13:15   ` Boris Brezillon
  -1 siblings, 0 replies; 4+ messages in thread
From: Boris Brezillon @ 2020-10-07 13:15 UTC (permalink / raw
  To: Jing Xiangfeng; +Cc: pgaj, bbrezillon, linux-i3c, linux-kernel

On Fri, 11 Sep 2020 11:33:50 +0800
Jing Xiangfeng <jingxiangfeng@huawei.com> wrote:

> Fix to return negative error code -ENOMEM from the error handling
> case instead of 0.
> 
> Signed-off-by: Jing Xiangfeng <jingxiangfeng@huawei.com>

Queued to i3c/next.

Thanks,

Boris

> ---
>  drivers/i3c/master/i3c-master-cdns.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/i3c/master/i3c-master-cdns.c b/drivers/i3c/master/i3c-master-cdns.c
> index 3fee8bd7fe20..3f2226928fe0 100644
> --- a/drivers/i3c/master/i3c-master-cdns.c
> +++ b/drivers/i3c/master/i3c-master-cdns.c
> @@ -1635,8 +1635,10 @@ static int cdns_i3c_master_probe(struct platform_device *pdev)
>  	master->ibi.slots = devm_kcalloc(&pdev->dev, master->ibi.num_slots,
>  					 sizeof(*master->ibi.slots),
>  					 GFP_KERNEL);
> -	if (!master->ibi.slots)
> +	if (!master->ibi.slots) {
> +		ret = -ENOMEM;
>  		goto err_disable_sysclk;
> +	}
>  
>  	writel(IBIR_THR(1), master->regs + CMD_IBI_THR_CTRL);
>  	writel(MST_INT_IBIR_THR, master->regs + MST_IER);


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] i3c: master: Fix error return in cdns_i3c_master_probe()
@ 2020-10-07 13:15   ` Boris Brezillon
  0 siblings, 0 replies; 4+ messages in thread
From: Boris Brezillon @ 2020-10-07 13:15 UTC (permalink / raw
  To: Jing Xiangfeng; +Cc: linux-kernel, pgaj, linux-i3c, bbrezillon

On Fri, 11 Sep 2020 11:33:50 +0800
Jing Xiangfeng <jingxiangfeng@huawei.com> wrote:

> Fix to return negative error code -ENOMEM from the error handling
> case instead of 0.
> 
> Signed-off-by: Jing Xiangfeng <jingxiangfeng@huawei.com>

Queued to i3c/next.

Thanks,

Boris

> ---
>  drivers/i3c/master/i3c-master-cdns.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/i3c/master/i3c-master-cdns.c b/drivers/i3c/master/i3c-master-cdns.c
> index 3fee8bd7fe20..3f2226928fe0 100644
> --- a/drivers/i3c/master/i3c-master-cdns.c
> +++ b/drivers/i3c/master/i3c-master-cdns.c
> @@ -1635,8 +1635,10 @@ static int cdns_i3c_master_probe(struct platform_device *pdev)
>  	master->ibi.slots = devm_kcalloc(&pdev->dev, master->ibi.num_slots,
>  					 sizeof(*master->ibi.slots),
>  					 GFP_KERNEL);
> -	if (!master->ibi.slots)
> +	if (!master->ibi.slots) {
> +		ret = -ENOMEM;
>  		goto err_disable_sysclk;
> +	}
>  
>  	writel(IBIR_THR(1), master->regs + CMD_IBI_THR_CTRL);
>  	writel(MST_INT_IBIR_THR, master->regs + MST_IER);


-- 
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-10-07 13:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-11  3:33 [PATCH] i3c: master: Fix error return in cdns_i3c_master_probe() Jing Xiangfeng
2020-09-11  3:33 ` Jing Xiangfeng
2020-10-07 13:15 ` Boris Brezillon
2020-10-07 13:15   ` Boris Brezillon

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.