All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: Re: [PATCH v1 6/7] soc: fsl: guts: drop platform driver
Date: Fri, 28 Jan 2022 12:50:34 +0800	[thread overview]
Message-ID: <202201281246.NKFv8GyG-lkp@intel.com> (raw)

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

CC: kbuild-all(a)lists.01.org
In-Reply-To: <20220127164125.3651285-7-michael@walle.cc>
References: <20220127164125.3651285-7-michael@walle.cc>
TO: Michael Walle <michael@walle.cc>

Hi Michael,

I love your patch! Perhaps something to improve:

[auto build test WARNING on soc/for-next]
[also build test WARNING on next-20220127]
[cannot apply to linux/master linus/master v5.17-rc1]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Michael-Walle/soc-fsl-guts-cleanups-and-serial_number-support/20220128-004223
base:   https://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git for-next
:::::: branch date: 12 hours ago
:::::: commit date: 12 hours ago
config: openrisc-randconfig-m031-20220124 (https://download.01.org/0day-ci/archive/20220128/202201281246.NKFv8GyG-lkp(a)intel.com/config)
compiler: or1k-linux-gcc (GCC) 11.2.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

New smatch warnings:
drivers/soc/fsl/guts.c:169 fsl_guts_init() warn: possible memory leak of 'soc_dev_attr'

Old smatch warnings:
drivers/soc/fsl/guts.c:182 fsl_guts_init() warn: possible memory leak of 'soc_dev_attr'

vim +/soc_dev_attr +169 drivers/soc/fsl/guts.c

a83b17321e29c5 Michael Walle 2022-01-27  144  
a83b17321e29c5 Michael Walle 2022-01-27  145  static int __init fsl_guts_init(void)
a6fc3b69813023 yangbo lu     2016-11-09  146  {
c93df5b7c92a04 Michael Walle 2022-01-27  147  	struct soc_device_attribute *soc_dev_attr;
c09e0eeea0bce0 Michael Walle 2022-01-27  148  	static struct soc_device *soc_dev;
a6fc3b69813023 yangbo lu     2016-11-09  149  	const struct fsl_soc_die_attr *soc_die;
01e929af81c348 Michael Walle 2022-01-27  150  	struct ccsr_guts __iomem *regs;
794557e9a91a9b Michael Walle 2022-01-27  151  	const char *machine = NULL;
a83b17321e29c5 Michael Walle 2022-01-27  152  	struct device_node *np;
01e929af81c348 Michael Walle 2022-01-27  153  	bool little_endian;
a6fc3b69813023 yangbo lu     2016-11-09  154  	u32 svr;
a83b17321e29c5 Michael Walle 2022-01-27  155  	int ret;
a83b17321e29c5 Michael Walle 2022-01-27  156  
a83b17321e29c5 Michael Walle 2022-01-27  157  	np = of_find_matching_node_and_match(NULL, fsl_guts_of_match, NULL);
a83b17321e29c5 Michael Walle 2022-01-27  158  	if (!np)
a83b17321e29c5 Michael Walle 2022-01-27  159  		return 0;
a6fc3b69813023 yangbo lu     2016-11-09  160  
a83b17321e29c5 Michael Walle 2022-01-27  161  	soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL);
c93df5b7c92a04 Michael Walle 2022-01-27  162  	if (!soc_dev_attr)
c93df5b7c92a04 Michael Walle 2022-01-27  163  		return -ENOMEM;
c93df5b7c92a04 Michael Walle 2022-01-27  164  
01e929af81c348 Michael Walle 2022-01-27  165  	little_endian = of_property_read_bool(np, "little-endian");
a6fc3b69813023 yangbo lu     2016-11-09  166  
01e929af81c348 Michael Walle 2022-01-27  167  	regs = of_iomap(np, 0);
01e929af81c348 Michael Walle 2022-01-27  168  	if (IS_ERR(regs))
01e929af81c348 Michael Walle 2022-01-27 @169  		return PTR_ERR(regs);

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH v1 6/7] soc: fsl: guts: drop platform driver
Date: Fri, 28 Jan 2022 10:25:03 +0300	[thread overview]
Message-ID: <202201281246.NKFv8GyG-lkp@intel.com> (raw)
In-Reply-To: <20220127164125.3651285-7-michael@walle.cc>

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

Hi Michael,

url:    https://github.com/0day-ci/linux/commits/Michael-Walle/soc-fsl-guts-cleanups-and-serial_number-support/20220128-004223
base:   https://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git for-next
config: openrisc-randconfig-m031-20220124 (https://download.01.org/0day-ci/archive/20220128/202201281246.NKFv8GyG-lkp(a)intel.com/config)
compiler: or1k-linux-gcc (GCC) 11.2.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

New smatch warnings:
drivers/soc/fsl/guts.c:169 fsl_guts_init() warn: possible memory leak of 'soc_dev_attr'

Old smatch warnings:
drivers/soc/fsl/guts.c:182 fsl_guts_init() warn: possible memory leak of 'soc_dev_attr'

vim +/soc_dev_attr +169 drivers/soc/fsl/guts.c

a83b17321e29c5 Michael Walle 2022-01-27  145  static int __init fsl_guts_init(void)
a6fc3b69813023 yangbo lu     2016-11-09  146  {
c93df5b7c92a04 Michael Walle 2022-01-27  147  	struct soc_device_attribute *soc_dev_attr;
c09e0eeea0bce0 Michael Walle 2022-01-27  148  	static struct soc_device *soc_dev;
a6fc3b69813023 yangbo lu     2016-11-09  149  	const struct fsl_soc_die_attr *soc_die;
01e929af81c348 Michael Walle 2022-01-27  150  	struct ccsr_guts __iomem *regs;
794557e9a91a9b Michael Walle 2022-01-27  151  	const char *machine = NULL;
a83b17321e29c5 Michael Walle 2022-01-27  152  	struct device_node *np;
01e929af81c348 Michael Walle 2022-01-27  153  	bool little_endian;
a6fc3b69813023 yangbo lu     2016-11-09  154  	u32 svr;
a83b17321e29c5 Michael Walle 2022-01-27  155  	int ret;
a83b17321e29c5 Michael Walle 2022-01-27  156  
a83b17321e29c5 Michael Walle 2022-01-27  157  	np = of_find_matching_node_and_match(NULL, fsl_guts_of_match, NULL);
a83b17321e29c5 Michael Walle 2022-01-27  158  	if (!np)
a83b17321e29c5 Michael Walle 2022-01-27  159  		return 0;
a6fc3b69813023 yangbo lu     2016-11-09  160  
a83b17321e29c5 Michael Walle 2022-01-27  161  	soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL);
                                                ^^^^^^^^^^^^^^^

c93df5b7c92a04 Michael Walle 2022-01-27  162  	if (!soc_dev_attr)
c93df5b7c92a04 Michael Walle 2022-01-27  163  		return -ENOMEM;
c93df5b7c92a04 Michael Walle 2022-01-27  164  
01e929af81c348 Michael Walle 2022-01-27  165  	little_endian = of_property_read_bool(np, "little-endian");
a6fc3b69813023 yangbo lu     2016-11-09  166  
01e929af81c348 Michael Walle 2022-01-27  167  	regs = of_iomap(np, 0);
01e929af81c348 Michael Walle 2022-01-27  168  	if (IS_ERR(regs))
01e929af81c348 Michael Walle 2022-01-27 @169  		return PTR_ERR(regs);
                                                        ^^^^^^^^^^^^^^^^^^^^
No error handling.  We'd want to call of_node_put(np) as well.



---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

             reply	other threads:[~2022-01-28  4:50 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-28  4:50 kernel test robot [this message]
2022-01-28  7:25 ` [PATCH v1 6/7] soc: fsl: guts: drop platform driver Dan Carpenter
  -- strict thread matches above, loose matches on Subject: below --
2022-01-27 16:41 [PATCH v1 0/7] soc: fsl: guts: cleanups and serial_number support Michael Walle
2022-01-27 16:41 ` Michael Walle
2022-01-27 16:41 ` Michael Walle
2022-01-27 16:41 ` [PATCH v1 1/7] soc: fsl: guts: machine variable might be unset Michael Walle
2022-01-27 16:41   ` Michael Walle
2022-01-27 16:41   ` Michael Walle
2022-01-27 16:41 ` [PATCH v1 2/7] soc: fsl: guts: remove module_exit() and fsl_guts_remove() Michael Walle
2022-01-27 16:41   ` Michael Walle
2022-01-27 16:41   ` Michael Walle
2022-01-27 16:41 ` [PATCH v1 3/7] soc: fsl: guts: embed fsl_guts_get_svr() in probe() Michael Walle
2022-01-27 16:41   ` Michael Walle
2022-01-27 16:41   ` Michael Walle
2022-01-27 16:41 ` [PATCH v1 4/7] soc: fsl: guts: allocate soc_dev_attr on the heap Michael Walle
2022-01-27 16:41   ` Michael Walle
2022-01-27 16:41   ` Michael Walle
2022-01-27 16:41 ` [PATCH v1 5/7] soc: fsl: guts: use of_root instead of own reference Michael Walle
2022-01-27 16:41   ` Michael Walle
2022-01-27 16:41   ` Michael Walle
2022-01-27 16:41 ` [PATCH v1 6/7] soc: fsl: guts: drop platform driver Michael Walle
2022-01-27 16:41   ` Michael Walle
2022-01-27 16:41   ` Michael Walle
2022-01-27 16:41 ` [RFC PATCH v1 7/7] soc: fsl: guts: add serial_number support Michael Walle
2022-01-27 16:41   ` Michael Walle
2022-01-27 16:41   ` Michael Walle

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=202201281246.NKFv8GyG-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild@lists.01.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 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.