* [PATCH -next,v2] spmi: pmic-arb: Add check for return value of platform_get_resource_byname
@ 2024-08-06 12:00 Gaosheng Cui
2024-08-06 15:19 ` Greg KH
0 siblings, 1 reply; 2+ messages in thread
From: Gaosheng Cui @ 2024-08-06 12:00 UTC (permalink / raw)
To: sboyd, joshc, gregkh, kheitke, cuigaosheng1; +Cc: linux-kernel
Add check for the return value of platform_get_resource_byname() and
return the error if it fails to catch the error.
Fixes: 39ae93e3a31d ("spmi: Add MSM PMIC Arbiter SPMI controller")
Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com>
---
v2: Add the fixes tag, thanks!
drivers/spmi/spmi-pmic-arb.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/spmi/spmi-pmic-arb.c b/drivers/spmi/spmi-pmic-arb.c
index 9ba9495fcc4b..5f5f2f0a10b9 100644
--- a/drivers/spmi/spmi-pmic-arb.c
+++ b/drivers/spmi/spmi-pmic-arb.c
@@ -1808,6 +1808,9 @@ static int spmi_pmic_arb_probe(struct platform_device *pdev)
return -ENOMEM;
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "core");
+ if (!res)
+ return -EINVAL;
+
core = devm_ioremap(dev, res->start, resource_size(res));
if (!core)
return -ENOMEM;
--
2.25.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH -next,v2] spmi: pmic-arb: Add check for return value of platform_get_resource_byname
2024-08-06 12:00 [PATCH -next,v2] spmi: pmic-arb: Add check for return value of platform_get_resource_byname Gaosheng Cui
@ 2024-08-06 15:19 ` Greg KH
0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2024-08-06 15:19 UTC (permalink / raw)
To: Gaosheng Cui; +Cc: sboyd, joshc, kheitke, linux-kernel
On Tue, Aug 06, 2024 at 08:00:45PM +0800, Gaosheng Cui wrote:
> Add check for the return value of platform_get_resource_byname() and
> return the error if it fails to catch the error.
>
> Fixes: 39ae93e3a31d ("spmi: Add MSM PMIC Arbiter SPMI controller")
> Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com>
> ---
> v2: Add the fixes tag, thanks!
> drivers/spmi/spmi-pmic-arb.c | 3 +++
> 1 file changed, 3 insertions(+)
Hi,
This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him
a patch that has triggered this response. He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created. Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.
You are receiving this message because of the following common error(s)
as indicated below:
- You have marked a patch with a "Fixes:" tag for a commit that is in an
older released kernel, yet you do not have a cc: stable line in the
signed-off-by area at all, which means that the patch will not be
applied to any older kernel releases. To properly fix this, please
follow the documented rules in the
Documentation/process/stable-kernel-rules.rst file for how to resolve
this.
If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.
thanks,
greg k-h's patch email bot
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-08-06 15:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-06 12:00 [PATCH -next,v2] spmi: pmic-arb: Add check for return value of platform_get_resource_byname Gaosheng Cui
2024-08-06 15:19 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®