lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181129112141.GR3073@unbuntlaptop>
Date:   Thu, 29 Nov 2018 14:21:41 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     kbuild@...org,
        Enric Balletbo i Serra <enric.balletbo@...labora.com>
Cc:     kbuild-all@...org, lee.jones@...aro.org, gwendal@...omium.org,
        drinkcat@...omium.org, linux-kernel@...r.kernel.org,
        groeck@...omium.org, kernel@...labora.com, bleung@...omium.org,
        Olof Johansson <olof@...om.net>
Subject: Re: [PATCH 5/7] mfd / platform: cros_ec: move device sysfs
 attributes to its own driver.

Hi Enric,

I love your patch! Perhaps something to improve:

url:    https://github.com/0day-ci/linux/commits/Enric-Balletbo-i-Serra/mfd-cros_ec-use-devm_mfd_add_devices/20181123-025253

smatch warnings:
drivers/platform/chrome/cros_ec_sysfs.c:366 cros_ec_sysfs_probe() warn: variable dereferenced before check 'ec_dev' (see line 362)

# https://github.com/0day-ci/linux/commit/b3074e331f36fff8890e7bd5c1f5874f4c59d38f
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout b3074e331f36fff8890e7bd5c1f5874f4c59d38f
vim +/ec_dev +366 drivers/platform/chrome/cros_ec_sysfs.c

b3074e33 Enric Balletbo i Serra 2018-11-22  358  
b3074e33 Enric Balletbo i Serra 2018-11-22  359  static int cros_ec_sysfs_probe(struct platform_device *pd)
b3074e33 Enric Balletbo i Serra 2018-11-22  360  {
b3074e33 Enric Balletbo i Serra 2018-11-22  361  	struct cros_ec_dev *ec_dev = dev_get_drvdata(pd->dev.parent);
b3074e33 Enric Balletbo i Serra 2018-11-22 @362  	struct cros_ec_platform *ec_platform = dev_get_platdata(ec_dev->dev);
                                                                                                                ^^^^^^^^^^^
b3074e33 Enric Balletbo i Serra 2018-11-22  363  	struct device *dev = &pd->dev;
b3074e33 Enric Balletbo i Serra 2018-11-22  364  	int ret;
b3074e33 Enric Balletbo i Serra 2018-11-22  365  
b3074e33 Enric Balletbo i Serra 2018-11-22 @366  	if (!ec_dev) {
                                                             ^^^^^^
Presumable this test can be removed?

b3074e33 Enric Balletbo i Serra 2018-11-22  367  		dev_err(dev, "No EC dev found\n");
b3074e33 Enric Balletbo i Serra 2018-11-22  368  		return -EINVAL;
b3074e33 Enric Balletbo i Serra 2018-11-22  369  	}
b3074e33 Enric Balletbo i Serra 2018-11-22  370  

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ