From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: drivers/net/wwan/wwan_core.c:417 wwan_port_fops_open() warn: passing a valid pointer to 'PTR_ERR'
Date: Fri, 26 Nov 2021 09:44:55 +0800 [thread overview]
Message-ID: <202111260930.3XUGaCmA-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2854 bytes --]
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Loic Poulain <loic.poulain@linaro.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 8ced7ca3570333998ad2088d5a6275701970e28e
commit: fa588eba632df14d296436995e6bbea0c146ae77 net: Add Qcom WWAN control driver
date: 7 months ago
:::::: branch date: 7 hours ago
:::::: commit date: 7 months ago
config: openrisc-randconfig-m031-20211123 (https://download.01.org/0day-ci/archive/20211126/202111260930.3XUGaCmA-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/net/wwan/wwan_core.c:417 wwan_port_fops_open() warn: passing a valid pointer to 'PTR_ERR'
Old smatch warnings:
drivers/net/wwan/wwan_core.c:305 wwan_port_txon() warn: test_bit() takes a bit number
drivers/net/wwan/wwan_core.c:312 wwan_port_txoff() warn: test_bit() takes a bit number
drivers/net/wwan/wwan_core.c:379 is_write_blocked() warn: test_bit() takes a bit number
vim +/PTR_ERR +417 drivers/net/wwan/wwan_core.c
9a44c1cc638876 Loic Poulain 2021-04-16 409
9a44c1cc638876 Loic Poulain 2021-04-16 410 static int wwan_port_fops_open(struct inode *inode, struct file *file)
9a44c1cc638876 Loic Poulain 2021-04-16 411 {
9a44c1cc638876 Loic Poulain 2021-04-16 412 struct wwan_port *port;
9a44c1cc638876 Loic Poulain 2021-04-16 413 int err = 0;
9a44c1cc638876 Loic Poulain 2021-04-16 414
9a44c1cc638876 Loic Poulain 2021-04-16 415 port = wwan_port_get_by_minor(iminor(inode));
9a44c1cc638876 Loic Poulain 2021-04-16 416 if (IS_ERR(port))
9a44c1cc638876 Loic Poulain 2021-04-16 @417 return PTR_ERR(port);
9a44c1cc638876 Loic Poulain 2021-04-16 418
9a44c1cc638876 Loic Poulain 2021-04-16 419 file->private_data = port;
9a44c1cc638876 Loic Poulain 2021-04-16 420 stream_open(inode, file);
9a44c1cc638876 Loic Poulain 2021-04-16 421
9a44c1cc638876 Loic Poulain 2021-04-16 422 err = wwan_port_op_start(port);
9a44c1cc638876 Loic Poulain 2021-04-16 423 if (err)
9a44c1cc638876 Loic Poulain 2021-04-16 424 put_device(&port->dev);
9a44c1cc638876 Loic Poulain 2021-04-16 425
9a44c1cc638876 Loic Poulain 2021-04-16 426 return err;
9a44c1cc638876 Loic Poulain 2021-04-16 427 }
9a44c1cc638876 Loic Poulain 2021-04-16 428
:::::: The code at line 417 was first introduced by commit
:::::: 9a44c1cc63887627284ae232a9626a9f1cd066fc net: Add a WWAN subsystem
:::::: TO: Loic Poulain <loic.poulain@linaro.org>
:::::: CC: David S. Miller <davem@davemloft.net>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
reply other threads:[~2021-11-26 1:44 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=202111260930.3XUGaCmA-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.