From: Scott Wood <oss@buserror.net>
To: Yangbo Lu <yangbo.lu@nxp.com>,
linux-mmc@vger.kernel.org, ulf.hansson@linaro.org,
Arnd Bergmann <arnd@arndb.de>
Cc: linuxppc-dev@lists.ozlabs.org, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org,
linux-i2c@vger.kernel.org, iommu@lists.linux-foundation.org,
netdev@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Mark Rutland <mark.rutland@arm.com>,
Rob Herring <robh+dt@kernel.org>,
Russell King <linux@arm.linux.org.uk>,
Jochen Friedrich <jochen@scram.de>,
Joerg Roedel <joro@8bytes.org>,
Claudiu Manoil <claudiu.manoil@freescale.com>,
Bhupesh Sharma <bhupesh.sharma@freescale.com>,
Qiang Zhao <qiang.zhao@nxp.com>,
Kumar Gala <galak@codeaurora.org>,
Santosh Shilimkar <ssantosh@kernel.org>,
Leo Li <leoyang.li@nxp.com>, Xiaobo Xie <xiaobo.xie@nxp.com>,
Minghuan Lian <minghuan.lian@nxp.com>
Subject: Re: [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
next prev parent 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
[not found] ` <1477625554-46700-1-git-send-email-yangbo.lu-3arQi8VN3Tc@public.gmane.org>
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]
[not found] ` <1477629956.6812.15.camel-fOR+EgIDQEHk1uMJSBkQmQ@public.gmane.org>
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=arnd@arndb.de \
--cc=bhupesh.sharma@freescale.com \
--cc=claudiu.manoil@freescale.com \
--cc=devicetree@vger.kernel.org \
--cc=galak@codeaurora.org \
--cc=gregkh@linuxfoundation.org \
--cc=iommu@lists.linux-foundation.org \
--cc=jochen@scram.de \
--cc=joro@8bytes.org \
--cc=leoyang.li@nxp.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mark.rutland@arm.com \
--cc=minghuan.lian@nxp.com \
--cc=netdev@vger.kernel.org \
--cc=qiang.zhao@nxp.com \
--cc=robh+dt@kernel.org \
--cc=ssantosh@kernel.org \
--cc=ulf.hansson@linaro.org \
--cc=xiaobo.xie@nxp.com \
--cc=yangbo.lu@nxp.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;
as well as URLs for NNTP newsgroup(s).