All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [PATCH] i2c: dev: fix eno.cocci warnings
Date: Thu, 25 Nov 2021 14:00:02 +0800	[thread overview]
Message-ID: <20211125060002.GA50659@8aec8ecfd301> (raw)
In-Reply-To: <20211115024926.205385-3-matt@codeconstruct.com.au>

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

From: kernel test robot <lkp@intel.com>

drivers/i2c/i2c-dev.c:291:6-12: ERROR: allocation function on line 289 returns NULL not ERR_PTR on failure

 The various basic memory allocation functions don't return ERR_PTR

Generated by: scripts/coccinelle/null/eno.cocci

CC: Matt Johnston <matt@codeconstruct.com.au>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

url:    https://github.com/0day-ci/linux/commits/Matt-Johnston/MCTP-I2C-driver/20211115-105011
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 1274a4eb318debe33e395bb8bcf8b98e6eb4670f
:::::: branch date: 10 days ago
:::::: commit date: 10 days ago

 i2c-dev.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/i2c/i2c-dev.c
+++ b/drivers/i2c/i2c-dev.c
@@ -288,7 +288,7 @@ static noinline int i2cdev_ioctl_rdwr(st
 		orig_lens[i] = msgs[i].len;
 		msgs[i].buf = kmalloc(msgs[i].len + I2C_SMBUS_V3_BLOCK_MAX,
 			GFP_USER | __GFP_NOWARN);
-		if (IS_ERR(msgs[i].buf)) {
+		if (!msgs[i].buf) {
 			res = PTR_ERR(msgs[i].buf);
 			break;
 		}

  reply	other threads:[~2021-11-25  6:00 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-15  2:49 [PATCH net-next v3 0/6] MCTP I2C driver Matt Johnston
2021-11-15  2:49 ` [PATCH net-next v3 1/6] i2c: core: Allow 255 byte transfers for SMBus 3.x Matt Johnston
2021-11-15  2:49 ` [PATCH net-next v3 2/6] i2c: dev: Handle 255 byte blocks for i2c ioctl Matt Johnston
2021-11-25  6:00   ` kernel test robot [this message]
2021-11-25  6:03   ` kernel test robot
2021-11-15  2:49 ` [PATCH net-next v3 3/6] i2c: aspeed: Allow 255 byte block transfers Matt Johnston
2021-11-15  2:49 ` [PATCH net-next v3 4/6] i2c: npcm7xx: Allow 255 byte block SMBus transfers Matt Johnston
2021-11-15  2:49 ` [PATCH net-next v3 5/6] dt-bindings: net: New binding mctp-i2c-controller Matt Johnston
2021-11-15  2:49 ` [PATCH net-next v3 6/6] mctp i2c: MCTP I2C binding driver Matt Johnston
2021-11-15 14:20 ` [PATCH net-next v3 0/6] MCTP I2C driver patchwork-bot+netdevbpf
2021-11-15 15:30   ` Wolfram Sang
2021-11-15 16:08     ` Jakub Kicinski
2021-11-15 16:11       ` Wolfram Sang
2021-11-24  3:15     ` Matt Johnston
2021-11-29 19:34       ` Wolfram Sang

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=20211125060002.GA50659@8aec8ecfd301 \
    --to=lkp@intel.com \
    --cc=kbuild-all@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.