All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mailbox: mpfs: fix copy and paste bug in probe
@ 2024-11-30 10:07 ` Dan Carpenter
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2024-11-30 10:07 UTC (permalink / raw)
  To: Conor Dooley
  Cc: Daire McNamara, Jassi Brar, linux-riscv, linux-kernel,
	kernel-janitors

This code accidentally checks ->ctrl_base instead of ->mbox_base so the
error handling can never be triggered.

Fixes: a4123ffab9ec ("mailbox: mpfs: support new, syscon based, devicetree configuration")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
 drivers/mailbox/mailbox-mpfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mailbox/mailbox-mpfs.c b/drivers/mailbox/mailbox-mpfs.c
index 4df546e3b7ea..d5d9effece97 100644
--- a/drivers/mailbox/mailbox-mpfs.c
+++ b/drivers/mailbox/mailbox-mpfs.c
@@ -251,7 +251,7 @@ static inline int mpfs_mbox_syscon_probe(struct mpfs_mbox *mbox, struct platform
 		return PTR_ERR(mbox->sysreg_scb);
 
 	mbox->mbox_base = devm_platform_ioremap_resource(pdev, 0);
-	if (IS_ERR(mbox->ctrl_base))
+	if (IS_ERR(mbox->mbox_base))
 		return PTR_ERR(mbox->mbox_base);
 
 	return 0;
-- 
2.45.2


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

* [PATCH] mailbox: mpfs: fix copy and paste bug in probe
@ 2024-11-30 10:07 ` Dan Carpenter
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2024-11-30 10:07 UTC (permalink / raw)
  To: Conor Dooley
  Cc: Daire McNamara, Jassi Brar, linux-riscv, linux-kernel,
	kernel-janitors

This code accidentally checks ->ctrl_base instead of ->mbox_base so the
error handling can never be triggered.

Fixes: a4123ffab9ec ("mailbox: mpfs: support new, syscon based, devicetree configuration")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
 drivers/mailbox/mailbox-mpfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mailbox/mailbox-mpfs.c b/drivers/mailbox/mailbox-mpfs.c
index 4df546e3b7ea..d5d9effece97 100644
--- a/drivers/mailbox/mailbox-mpfs.c
+++ b/drivers/mailbox/mailbox-mpfs.c
@@ -251,7 +251,7 @@ static inline int mpfs_mbox_syscon_probe(struct mpfs_mbox *mbox, struct platform
 		return PTR_ERR(mbox->sysreg_scb);
 
 	mbox->mbox_base = devm_platform_ioremap_resource(pdev, 0);
-	if (IS_ERR(mbox->ctrl_base))
+	if (IS_ERR(mbox->mbox_base))
 		return PTR_ERR(mbox->mbox_base);
 
 	return 0;
-- 
2.45.2


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

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

* Re: [PATCH] mailbox: mpfs: fix copy and paste bug in probe
  2024-11-30 10:07 ` Dan Carpenter
@ 2024-12-02 12:11   ` Conor Dooley
  -1 siblings, 0 replies; 4+ messages in thread
From: Conor Dooley @ 2024-12-02 12:11 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Conor Dooley, Daire McNamara, Jassi Brar, linux-riscv,
	linux-kernel, kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 1357 bytes --]

On Sat, Nov 30, 2024 at 01:07:23PM +0300, Dan Carpenter wrote:
> This code accidentally checks ->ctrl_base instead of ->mbox_base so the
> error handling can never be triggered.
> 
> Fixes: a4123ffab9ec ("mailbox: mpfs: support new, syscon based, devicetree configuration")

This got merged? Would have been nice to know about it Jassi, you
really should adopt some mechanism of informing people that you applied
their patches.

I had added a fix for this locally Dan after we discussed it previously,
but since this made it in without that:
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>

Thanks,
Conor.

> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
> ---
>  drivers/mailbox/mailbox-mpfs.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mailbox/mailbox-mpfs.c b/drivers/mailbox/mailbox-mpfs.c
> index 4df546e3b7ea..d5d9effece97 100644
> --- a/drivers/mailbox/mailbox-mpfs.c
> +++ b/drivers/mailbox/mailbox-mpfs.c
> @@ -251,7 +251,7 @@ static inline int mpfs_mbox_syscon_probe(struct mpfs_mbox *mbox, struct platform
>  		return PTR_ERR(mbox->sysreg_scb);
>  
>  	mbox->mbox_base = devm_platform_ioremap_resource(pdev, 0);
> -	if (IS_ERR(mbox->ctrl_base))
> +	if (IS_ERR(mbox->mbox_base))
>  		return PTR_ERR(mbox->mbox_base);
>  
>  	return 0;
> -- 
> 2.45.2
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

* Re: [PATCH] mailbox: mpfs: fix copy and paste bug in probe
@ 2024-12-02 12:11   ` Conor Dooley
  0 siblings, 0 replies; 4+ messages in thread
From: Conor Dooley @ 2024-12-02 12:11 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Conor Dooley, Daire McNamara, Jassi Brar, linux-riscv,
	linux-kernel, kernel-janitors


[-- Attachment #1.1: Type: text/plain, Size: 1357 bytes --]

On Sat, Nov 30, 2024 at 01:07:23PM +0300, Dan Carpenter wrote:
> This code accidentally checks ->ctrl_base instead of ->mbox_base so the
> error handling can never be triggered.
> 
> Fixes: a4123ffab9ec ("mailbox: mpfs: support new, syscon based, devicetree configuration")

This got merged? Would have been nice to know about it Jassi, you
really should adopt some mechanism of informing people that you applied
their patches.

I had added a fix for this locally Dan after we discussed it previously,
but since this made it in without that:
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>

Thanks,
Conor.

> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
> ---
>  drivers/mailbox/mailbox-mpfs.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mailbox/mailbox-mpfs.c b/drivers/mailbox/mailbox-mpfs.c
> index 4df546e3b7ea..d5d9effece97 100644
> --- a/drivers/mailbox/mailbox-mpfs.c
> +++ b/drivers/mailbox/mailbox-mpfs.c
> @@ -251,7 +251,7 @@ static inline int mpfs_mbox_syscon_probe(struct mpfs_mbox *mbox, struct platform
>  		return PTR_ERR(mbox->sysreg_scb);
>  
>  	mbox->mbox_base = devm_platform_ioremap_resource(pdev, 0);
> -	if (IS_ERR(mbox->ctrl_base))
> +	if (IS_ERR(mbox->mbox_base))
>  		return PTR_ERR(mbox->mbox_base);
>  
>  	return 0;
> -- 
> 2.45.2
> 

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

[-- Attachment #2: Type: text/plain, Size: 161 bytes --]

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

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

end of thread, other threads:[~2024-12-02 12:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-30 10:07 [PATCH] mailbox: mpfs: fix copy and paste bug in probe Dan Carpenter
2024-11-30 10:07 ` Dan Carpenter
2024-12-02 12:11 ` Conor Dooley
2024-12-02 12:11   ` Conor Dooley

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.