linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: oss@buserror.net (Scott Wood)
To: linux-arm-kernel@lists.infradead.org
Subject: [v13, 5/8] soc: fsl: add GUTS driver for QorIQ platforms
Date: Thu, 27 Oct 2016 23:45:56 -0500	[thread overview]
Message-ID: <1477629956.6812.15.camel@buserror.net> (raw)
In-Reply-To: <1477625554-46700-6-git-send-email-yangbo.lu@nxp.com>

On Fri, 2016-10-28 at 11:32 +0800, Yangbo Lu wrote:
> +	guts->regs = of_iomap(np, 0);
> +	if (!guts->regs)
> +		return -ENOMEM;
> +
> +	/* Register soc device */
> +	machine = of_flat_dt_get_machine_name();
> +	if (machine)
> +		soc_dev_attr.machine = devm_kstrdup(dev, machine,
> GFP_KERNEL);
> +
> +	svr = fsl_guts_get_svr();
> +	soc_die = fsl_soc_die_match(svr, fsl_soc_die);
> +	if (soc_die) {
> +		soc_dev_attr.family = devm_kasprintf(dev, GFP_KERNEL,
> +						?????"QorIQ %s", soc_die-
> >die);
> +	} else {
> +		soc_dev_attr.family = devm_kasprintf(dev, GFP_KERNEL,
> "QorIQ");
> +	}
> +	soc_dev_attr.soc_id = devm_kasprintf(dev, GFP_KERNEL,
> +					?????"svr:0x%08x", svr);
> +	soc_dev_attr.revision = devm_kasprintf(dev, GFP_KERNEL, "%d.%d",
> +					???????SVR_MAJ(svr), SVR_MIN(svr));
> +
> +	soc_dev = soc_device_register(&soc_dev_attr);
> +	if (IS_ERR(soc_dev))
> +		return PTR_ERR(soc_dev);

ioremap leaks on this error path. ?Use devm_ioremap_resource().

-Scott

  reply	other threads:[~2016-10-28  4:45 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-28  3:32 [v13, 0/8] Fix eSDHC host version register bug Yangbo Lu
2016-10-28  3:32 ` [v13, 1/8] dt: bindings: update Freescale DCFG compatible Yangbo Lu
2016-10-28  3:32 ` [v13, 2/8] ARM64: dts: ls2080a: add device configuration node Yangbo Lu
2016-10-28  3:32 ` [v13, 3/8] dt: bindings: move guts devicetree doc out of powerpc directory Yangbo Lu
2016-10-28  3:32 ` [v13, 4/8] powerpc/fsl: move mpc85xx.h to include/linux/fsl Yangbo Lu
2016-10-28  3:32 ` [v13, 5/8] soc: fsl: add GUTS driver for QorIQ platforms Yangbo Lu
2016-10-28  4:45   ` Scott Wood [this message]
2016-10-28  6:00     ` Y.B. Lu
2016-10-28  6:06     ` Y.B. Lu
2016-10-28  7:08     ` Y.B. Lu
2016-10-28  3:32 ` [v13, 6/8] MAINTAINERS: add entry for Freescale SoC drivers Yangbo Lu
2016-10-28  3:32 ` [v13, 7/8] base: soc: introduce soc_device_match() interface Yangbo Lu
2016-10-28  3:32 ` [v13, 8/8] mmc: sdhci-of-esdhc: fix host version for T4240-R1.0-R2.0 Yangbo Lu

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=1477629956.6812.15.camel@buserror.net \
    --to=oss@buserror.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).