All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: [skn:v5.13/ffa 5/6] drivers/firmware/arm_ffa/driver.c:290:11-15: ERROR: reference preceded by free on line 288
Date: Tue, 25 May 2021 13:01:39 +0800	[thread overview]
Message-ID: <202105251337.NnJC2Kqd-lkp@intel.com> (raw)

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

CC: kbuild-all(a)lists.01.org
TO: Sudeep Holla <sudeep.holla@arm.com>
CC: Jens Wiklander <jens.wiklander@linaro.org>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux.git v5.13/ffa
head:   84cc1893ebd6f69bf72ff94ad32e57eb0ec9a1f0
commit: 437b70e4d6815e6bf719f5295014342d0b964ccb [5/6] firmware: arm_ffa: Setup in-kernel users of FFA partitions
:::::: branch date: 16 hours ago
:::::: commit date: 16 hours ago
config: arm64-allyesconfig (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Julia Lawall <julia.lawall@lip6.fr>


cocci warnings: (new ones prefixed by >>)
>> drivers/firmware/arm_ffa/driver.c:290:11-15: ERROR: reference preceded by free on line 288

vim +290 drivers/firmware/arm_ffa/driver.c

437b70e4d6815e Sudeep Holla 2021-04-30  266  
437b70e4d6815e Sudeep Holla 2021-04-30  267  /* buffer is allocated and caller must free the same if returned count > 0 */
437b70e4d6815e Sudeep Holla 2021-04-30  268  static int
437b70e4d6815e Sudeep Holla 2021-04-30  269  ffa_partition_probe(const uuid_t *uuid, struct ffa_partition_info **buffer)
437b70e4d6815e Sudeep Holla 2021-04-30  270  {
437b70e4d6815e Sudeep Holla 2021-04-30  271  	int count;
437b70e4d6815e Sudeep Holla 2021-04-30  272  	u32 uuid0_4[4];
437b70e4d6815e Sudeep Holla 2021-04-30  273  	struct ffa_partition_info *pbuf;
437b70e4d6815e Sudeep Holla 2021-04-30  274  
437b70e4d6815e Sudeep Holla 2021-04-30  275  	export_uuid((u8 *)uuid0_4, uuid);
437b70e4d6815e Sudeep Holla 2021-04-30  276  	count = __ffa_partition_info_get(uuid0_4[0], uuid0_4[1], uuid0_4[2],
437b70e4d6815e Sudeep Holla 2021-04-30  277  					 uuid0_4[3], NULL, 0);
437b70e4d6815e Sudeep Holla 2021-04-30  278  	if (count <= 0)
437b70e4d6815e Sudeep Holla 2021-04-30  279  		return count;
437b70e4d6815e Sudeep Holla 2021-04-30  280  
437b70e4d6815e Sudeep Holla 2021-04-30  281  	pbuf = kcalloc(count, sizeof(*pbuf), GFP_KERNEL);
437b70e4d6815e Sudeep Holla 2021-04-30  282  	if (!pbuf)
437b70e4d6815e Sudeep Holla 2021-04-30  283  		return -ENOMEM;
437b70e4d6815e Sudeep Holla 2021-04-30  284  
437b70e4d6815e Sudeep Holla 2021-04-30  285  	count = __ffa_partition_info_get(uuid0_4[0], uuid0_4[1], uuid0_4[2],
437b70e4d6815e Sudeep Holla 2021-04-30  286  					 uuid0_4[3], pbuf, count);
437b70e4d6815e Sudeep Holla 2021-04-30  287  	if (count <= 0)
437b70e4d6815e Sudeep Holla 2021-04-30 @288  		kfree(pbuf);
437b70e4d6815e Sudeep Holla 2021-04-30  289  
437b70e4d6815e Sudeep Holla 2021-04-30 @290  	*buffer = pbuf;
437b70e4d6815e Sudeep Holla 2021-04-30  291  	return count;
437b70e4d6815e Sudeep Holla 2021-04-30  292  }
437b70e4d6815e Sudeep Holla 2021-04-30  293  

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

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 77678 bytes --]

                 reply	other threads:[~2021-05-25  5:01 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202105251337.NnJC2Kqd-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.