From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: re: Add support of Cavium Liquidio ethernet adapters
Date: Fri, 26 Jun 2015 09:04:27 +0000 [thread overview]
Message-ID: <20150626090427.GA28090@mwanda> (raw)
In-Reply-To: <20150623142408.GA10121@mwanda>
Hello Raghu Vatsavayi,
The patch f21fb3ed364b: "Add support of Cavium Liquidio ethernet
adapters" from Jun 9, 2015, leads to the following static checker
warning:
drivers/net/ethernet/cavium/liquidio/octeon_console.c:326 cvmx_bootmem_phy_named_block_find()
error: potential null dereference 'name_tmp'. (kmalloc returns null)
drivers/net/ethernet/cavium/liquidio/octeon_console.c
319 for (i = 0; i < num_blocks; i++) {
320 u64 named_size 321 CVMX_BOOTMEM_NAMED_GET_FIELD(oct, named_addr,
322 size);
323 if (name && named_size) {
324 char *name_tmp 325 kmalloc(name_length + 1, GFP_KERNEL);
kmalloc can fail.
326 CVMX_BOOTMEM_NAMED_GET_NAME(oct, named_addr,
327 name_tmp,
328 name_length);
329 if (!strncmp(name, name_tmp, name_length)) {
330 result = named_addr;
331 kfree(name_tmp);
332 break;
333 }
334 kfree(name_tmp);
335 } else if (!name && !named_size) {
336 result = named_addr;
337 break;
338 }
339
340 named_addr + 341 sizeof(struct cvmx_bootmem_named_block_desc);
342 }
regards,
dan carpenter
prev parent reply other threads:[~2015-06-26 9:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-23 14:24 Add support of Cavium Liquidio ethernet adapters Dan Carpenter
2015-06-25 9:27 ` Dan Carpenter
2015-06-26 9:04 ` Dan Carpenter [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=20150626090427.GA28090@mwanda \
--to=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.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.