All of lore.kernel.org
 help / color / mirror / Atom feed
* drivers/net/wwan/wwan_core.c:417 wwan_port_fops_open() warn: passing a valid pointer to 'PTR_ERR'
@ 2021-11-26  1:44 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-11-26  1:44 UTC (permalink / raw)
  To: kbuild

[-- 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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-11-26  1:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-26  1:44 drivers/net/wwan/wwan_core.c:417 wwan_port_fops_open() warn: passing a valid pointer to 'PTR_ERR' kernel test robot

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.