mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dominik Brodowski <linux@dominikbrodowski.net>
To: Chen Ni <nichen@iscas.ac.cn>
Cc: tony@atomide.com, arnd@arndb.de, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] pcmcia: omap: Add missing check for platform_get_resource
Date: Sat, 16 Aug 2025 16:43:06 +0200	[thread overview]
Message-ID: <aKCY-rmXymcSNrhr@shine.dominikbrodowski.net> (raw)
In-Reply-To: <20250320063956.211577-1-nichen@iscas.ac.cn>

Am Thu, Mar 20, 2025 at 02:39:56PM +0800 schrieb Chen Ni:
> Add missing check for platform_get_resource() and return error if it fails
> to catch the error.
> 
> Fixes: d87d44f7ab35 ("ARM: omap1: move CF chipselect setup to board file")
> Signed-off-by: Chen Ni <nichen@iscas.ac.cn>

Applied to pcmcia-next, thanks.

Best,
	Dominik

> ---
>  drivers/pcmcia/omap_cf.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/pcmcia/omap_cf.c b/drivers/pcmcia/omap_cf.c
> index f0ccf479f36e..e0a3820acaef 100644
> --- a/drivers/pcmcia/omap_cf.c
> +++ b/drivers/pcmcia/omap_cf.c
> @@ -215,6 +215,8 @@ static int __init omap_cf_probe(struct platform_device *pdev)
>  		return -EINVAL;
>  
>  	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> +	if (!res)
> +		return -EINVAL;
>  
>  	cf = kzalloc(sizeof *cf, GFP_KERNEL);
>  	if (!cf)
> -- 
> 2.25.1
> 
> 

      reply	other threads:[~2025-08-16 14:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-20  6:39 Chen Ni
2025-08-16 14:43 ` Dominik Brodowski [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aKCY-rmXymcSNrhr@shine.dominikbrodowski.net \
    --to=linux@dominikbrodowski.net \
    --cc=arnd@arndb.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nichen@iscas.ac.cn \
    --cc=tony@atomide.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®