* drivers/ata/libahci_platform.c:552 ahci_platform_get_resources() warn: passing zero to 'ERR_PTR'
@ 2022-08-31 1:54 kernel test robot
0 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2022-08-31 1:54 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 4803 bytes --]
BCC: lkp(a)intel.com
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Wang Hai <wanghai38@huawei.com>
CC: Damien Le Moal <damien.lemoal@wdc.com>
CC: Hans de Goede <hdegoede@redhat.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: dcf8e5633e2e69ad60b730ab5905608b756a032f
commit: 776c75010803849c1cc4f11031a2b3960ab05202 ata: ahci_platform: fix null-ptr-deref in ahci_platform_enable_regulators()
date: 11 months ago
:::::: branch date: 29 hours ago
:::::: commit date: 11 months ago
config: xtensa-randconfig-m031-20220830 (https://download.01.org/0day-ci/archive/20220831/202208310913.Hjkorbae-lkp(a)intel.com/config)
compiler: xtensa-linux-gcc (GCC) 12.1.0
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
drivers/ata/libahci_platform.c:552 ahci_platform_get_resources() warn: passing zero to 'ERR_PTR'
vim +/ERR_PTR +552 drivers/ata/libahci_platform.c
b1a9edbda040a4 Antoine Tenart 2014-07-30 513
c7d7ddee7e24ee Gregory CLEMENT 2015-01-15 514 rc = ahci_platform_get_phy(hpriv, port, dev, child);
d7f76f36a8b4dc Nishka Dasgupta 2019-08-15 515 if (rc) {
d7f76f36a8b4dc Nishka Dasgupta 2019-08-15 516 of_node_put(child);
c7d7ddee7e24ee Gregory CLEMENT 2015-01-15 517 goto err_out;
d7f76f36a8b4dc Nishka Dasgupta 2019-08-15 518 }
c7d7ddee7e24ee Gregory CLEMENT 2015-01-15 519
b1a9edbda040a4 Antoine Tenart 2014-07-30 520 enabled_ports++;
b1a9edbda040a4 Antoine Tenart 2014-07-30 521 }
b1a9edbda040a4 Antoine Tenart 2014-07-30 522 if (!enabled_ports) {
b1a9edbda040a4 Antoine Tenart 2014-07-30 523 dev_warn(dev, "No port enabled\n");
b1a9edbda040a4 Antoine Tenart 2014-07-30 524 rc = -ENODEV;
b1a9edbda040a4 Antoine Tenart 2014-07-30 525 goto err_out;
b1a9edbda040a4 Antoine Tenart 2014-07-30 526 }
b1a9edbda040a4 Antoine Tenart 2014-07-30 527
b1a9edbda040a4 Antoine Tenart 2014-07-30 528 if (!hpriv->mask_port_map)
b1a9edbda040a4 Antoine Tenart 2014-07-30 529 hpriv->mask_port_map = mask_port_map;
b1a9edbda040a4 Antoine Tenart 2014-07-30 530 } else {
b1a9edbda040a4 Antoine Tenart 2014-07-30 531 /*
b1a9edbda040a4 Antoine Tenart 2014-07-30 532 * If no sub-node was found, keep this for device tree
b1a9edbda040a4 Antoine Tenart 2014-07-30 533 * compatibility
b1a9edbda040a4 Antoine Tenart 2014-07-30 534 */
c7d7ddee7e24ee Gregory CLEMENT 2015-01-15 535 rc = ahci_platform_get_phy(hpriv, 0, dev, dev->of_node);
c7d7ddee7e24ee Gregory CLEMENT 2015-01-15 536 if (rc)
acbd573354bb7b Mikko Perttunen 2014-06-17 537 goto err_out;
fd990556f0fa25 Bartlomiej Zolnierkiewicz 2014-03-25 538
c7d7ddee7e24ee Gregory CLEMENT 2015-01-15 539 rc = ahci_platform_get_regulator(hpriv, 0, dev);
c7d7ddee7e24ee Gregory CLEMENT 2015-01-15 540 if (rc == -EPROBE_DEFER)
fd990556f0fa25 Bartlomiej Zolnierkiewicz 2014-03-25 541 goto err_out;
b1a9edbda040a4 Antoine Tenart 2014-07-30 542 }
fd990556f0fa25 Bartlomiej Zolnierkiewicz 2014-03-25 543 pm_runtime_enable(dev);
eac7e072d7e99f Tejun Heo 2018-08-06 544 pm_runtime_get_sync(dev);
fd990556f0fa25 Bartlomiej Zolnierkiewicz 2014-03-25 545 hpriv->got_runtime_pm = true;
fd990556f0fa25 Bartlomiej Zolnierkiewicz 2014-03-25 546
fd990556f0fa25 Bartlomiej Zolnierkiewicz 2014-03-25 547 devres_remove_group(dev, NULL);
fd990556f0fa25 Bartlomiej Zolnierkiewicz 2014-03-25 548 return hpriv;
fd990556f0fa25 Bartlomiej Zolnierkiewicz 2014-03-25 549
fd990556f0fa25 Bartlomiej Zolnierkiewicz 2014-03-25 550 err_out:
fd990556f0fa25 Bartlomiej Zolnierkiewicz 2014-03-25 551 devres_release_group(dev, NULL);
fd990556f0fa25 Bartlomiej Zolnierkiewicz 2014-03-25 @552 return ERR_PTR(rc);
fd990556f0fa25 Bartlomiej Zolnierkiewicz 2014-03-25 553 }
fd990556f0fa25 Bartlomiej Zolnierkiewicz 2014-03-25 554 EXPORT_SYMBOL_GPL(ahci_platform_get_resources);
fd990556f0fa25 Bartlomiej Zolnierkiewicz 2014-03-25 555
:::::: The code at line 552 was first introduced by commit
:::::: fd990556f0fa25446c6bfa9cf4c9e49d387d4472 ata: move library code from ahci_platform.c to libahci_platform.c
:::::: TO: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
:::::: CC: Tejun Heo <tj@kernel.org>
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] 5+ messages in thread
* drivers/ata/libahci_platform.c:552 ahci_platform_get_resources() warn: passing zero to 'ERR_PTR'
@ 2022-07-31 7:00 kernel test robot
0 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2022-07-31 7:00 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 4888 bytes --]
CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: linux-kernel(a)vger.kernel.org
TO: Wang Hai <wanghai38@huawei.com>
CC: Damien Le Moal <damien.lemoal@wdc.com>
CC: Hans de Goede <hdegoede@redhat.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 6a010258447d386186ca10cd374d888ac66ffe1a
commit: 776c75010803849c1cc4f11031a2b3960ab05202 ata: ahci_platform: fix null-ptr-deref in ahci_platform_enable_regulators()
date: 10 months ago
:::::: branch date: 7 hours ago
:::::: commit date: 10 months ago
config: openrisc-randconfig-m041-20220731 (https://download.01.org/0day-ci/archive/20220731/202207311447.RWacsQPY-lkp(a)intel.com/config)
compiler: or1k-linux-gcc (GCC) 12.1.0
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
drivers/ata/libahci_platform.c:552 ahci_platform_get_resources() warn: passing zero to 'ERR_PTR'
vim +/ERR_PTR +552 drivers/ata/libahci_platform.c
b1a9edbda040a435 Antoine Tenart 2014-07-30 513
c7d7ddee7e24eedd Gregory CLEMENT 2015-01-15 514 rc = ahci_platform_get_phy(hpriv, port, dev, child);
d7f76f36a8b4dc8e Nishka Dasgupta 2019-08-15 515 if (rc) {
d7f76f36a8b4dc8e Nishka Dasgupta 2019-08-15 516 of_node_put(child);
c7d7ddee7e24eedd Gregory CLEMENT 2015-01-15 517 goto err_out;
d7f76f36a8b4dc8e Nishka Dasgupta 2019-08-15 518 }
c7d7ddee7e24eedd Gregory CLEMENT 2015-01-15 519
b1a9edbda040a435 Antoine Tenart 2014-07-30 520 enabled_ports++;
b1a9edbda040a435 Antoine Tenart 2014-07-30 521 }
b1a9edbda040a435 Antoine Tenart 2014-07-30 522 if (!enabled_ports) {
b1a9edbda040a435 Antoine Tenart 2014-07-30 523 dev_warn(dev, "No port enabled\n");
b1a9edbda040a435 Antoine Tenart 2014-07-30 524 rc = -ENODEV;
b1a9edbda040a435 Antoine Tenart 2014-07-30 525 goto err_out;
b1a9edbda040a435 Antoine Tenart 2014-07-30 526 }
b1a9edbda040a435 Antoine Tenart 2014-07-30 527
b1a9edbda040a435 Antoine Tenart 2014-07-30 528 if (!hpriv->mask_port_map)
b1a9edbda040a435 Antoine Tenart 2014-07-30 529 hpriv->mask_port_map = mask_port_map;
b1a9edbda040a435 Antoine Tenart 2014-07-30 530 } else {
b1a9edbda040a435 Antoine Tenart 2014-07-30 531 /*
b1a9edbda040a435 Antoine Tenart 2014-07-30 532 * If no sub-node was found, keep this for device tree
b1a9edbda040a435 Antoine Tenart 2014-07-30 533 * compatibility
b1a9edbda040a435 Antoine Tenart 2014-07-30 534 */
c7d7ddee7e24eedd Gregory CLEMENT 2015-01-15 535 rc = ahci_platform_get_phy(hpriv, 0, dev, dev->of_node);
c7d7ddee7e24eedd Gregory CLEMENT 2015-01-15 536 if (rc)
acbd573354bb7b7b Mikko Perttunen 2014-06-17 537 goto err_out;
fd990556f0fa2544 Bartlomiej Zolnierkiewicz 2014-03-25 538
c7d7ddee7e24eedd Gregory CLEMENT 2015-01-15 539 rc = ahci_platform_get_regulator(hpriv, 0, dev);
c7d7ddee7e24eedd Gregory CLEMENT 2015-01-15 540 if (rc == -EPROBE_DEFER)
fd990556f0fa2544 Bartlomiej Zolnierkiewicz 2014-03-25 541 goto err_out;
b1a9edbda040a435 Antoine Tenart 2014-07-30 542 }
fd990556f0fa2544 Bartlomiej Zolnierkiewicz 2014-03-25 543 pm_runtime_enable(dev);
eac7e072d7e99fad Tejun Heo 2018-08-06 544 pm_runtime_get_sync(dev);
fd990556f0fa2544 Bartlomiej Zolnierkiewicz 2014-03-25 545 hpriv->got_runtime_pm = true;
fd990556f0fa2544 Bartlomiej Zolnierkiewicz 2014-03-25 546
fd990556f0fa2544 Bartlomiej Zolnierkiewicz 2014-03-25 547 devres_remove_group(dev, NULL);
fd990556f0fa2544 Bartlomiej Zolnierkiewicz 2014-03-25 548 return hpriv;
fd990556f0fa2544 Bartlomiej Zolnierkiewicz 2014-03-25 549
fd990556f0fa2544 Bartlomiej Zolnierkiewicz 2014-03-25 550 err_out:
fd990556f0fa2544 Bartlomiej Zolnierkiewicz 2014-03-25 551 devres_release_group(dev, NULL);
fd990556f0fa2544 Bartlomiej Zolnierkiewicz 2014-03-25 @552 return ERR_PTR(rc);
fd990556f0fa2544 Bartlomiej Zolnierkiewicz 2014-03-25 553 }
fd990556f0fa2544 Bartlomiej Zolnierkiewicz 2014-03-25 554 EXPORT_SYMBOL_GPL(ahci_platform_get_resources);
fd990556f0fa2544 Bartlomiej Zolnierkiewicz 2014-03-25 555
:::::: The code at line 552 was first introduced by commit
:::::: fd990556f0fa25446c6bfa9cf4c9e49d387d4472 ata: move library code from ahci_platform.c to libahci_platform.c
:::::: TO: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
:::::: CC: Tejun Heo <tj@kernel.org>
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] 5+ messages in thread
* drivers/ata/libahci_platform.c:552 ahci_platform_get_resources() warn: passing zero to 'ERR_PTR'
@ 2022-03-17 23:52 kernel test robot
0 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2022-03-17 23:52 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 4841 bytes --]
CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: linux-kernel(a)vger.kernel.org
TO: Wang Hai <wanghai38@huawei.com>
CC: Damien Le Moal <damien.lemoal@wdc.com>
CC: Hans de Goede <hdegoede@redhat.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 56e337f2cf1326323844927a04e9dbce9a244835
commit: 776c75010803849c1cc4f11031a2b3960ab05202 ata: ahci_platform: fix null-ptr-deref in ahci_platform_enable_regulators()
date: 5 months ago
:::::: branch date: 2 days ago
:::::: commit date: 5 months ago
config: openrisc-randconfig-m031-20220317 (https://download.01.org/0day-ci/archive/20220318/202203180743.gbS3jHXG-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>
smatch warnings:
drivers/ata/libahci_platform.c:552 ahci_platform_get_resources() warn: passing zero to 'ERR_PTR'
vim +/ERR_PTR +552 drivers/ata/libahci_platform.c
b1a9edbda040a4 Antoine Tenart 2014-07-30 513
c7d7ddee7e24ee Gregory CLEMENT 2015-01-15 514 rc = ahci_platform_get_phy(hpriv, port, dev, child);
d7f76f36a8b4dc Nishka Dasgupta 2019-08-15 515 if (rc) {
d7f76f36a8b4dc Nishka Dasgupta 2019-08-15 516 of_node_put(child);
c7d7ddee7e24ee Gregory CLEMENT 2015-01-15 517 goto err_out;
d7f76f36a8b4dc Nishka Dasgupta 2019-08-15 518 }
c7d7ddee7e24ee Gregory CLEMENT 2015-01-15 519
b1a9edbda040a4 Antoine Tenart 2014-07-30 520 enabled_ports++;
b1a9edbda040a4 Antoine Tenart 2014-07-30 521 }
b1a9edbda040a4 Antoine Tenart 2014-07-30 522 if (!enabled_ports) {
b1a9edbda040a4 Antoine Tenart 2014-07-30 523 dev_warn(dev, "No port enabled\n");
b1a9edbda040a4 Antoine Tenart 2014-07-30 524 rc = -ENODEV;
b1a9edbda040a4 Antoine Tenart 2014-07-30 525 goto err_out;
b1a9edbda040a4 Antoine Tenart 2014-07-30 526 }
b1a9edbda040a4 Antoine Tenart 2014-07-30 527
b1a9edbda040a4 Antoine Tenart 2014-07-30 528 if (!hpriv->mask_port_map)
b1a9edbda040a4 Antoine Tenart 2014-07-30 529 hpriv->mask_port_map = mask_port_map;
b1a9edbda040a4 Antoine Tenart 2014-07-30 530 } else {
b1a9edbda040a4 Antoine Tenart 2014-07-30 531 /*
b1a9edbda040a4 Antoine Tenart 2014-07-30 532 * If no sub-node was found, keep this for device tree
b1a9edbda040a4 Antoine Tenart 2014-07-30 533 * compatibility
b1a9edbda040a4 Antoine Tenart 2014-07-30 534 */
c7d7ddee7e24ee Gregory CLEMENT 2015-01-15 535 rc = ahci_platform_get_phy(hpriv, 0, dev, dev->of_node);
c7d7ddee7e24ee Gregory CLEMENT 2015-01-15 536 if (rc)
acbd573354bb7b Mikko Perttunen 2014-06-17 537 goto err_out;
fd990556f0fa25 Bartlomiej Zolnierkiewicz 2014-03-25 538
c7d7ddee7e24ee Gregory CLEMENT 2015-01-15 539 rc = ahci_platform_get_regulator(hpriv, 0, dev);
c7d7ddee7e24ee Gregory CLEMENT 2015-01-15 540 if (rc == -EPROBE_DEFER)
fd990556f0fa25 Bartlomiej Zolnierkiewicz 2014-03-25 541 goto err_out;
b1a9edbda040a4 Antoine Tenart 2014-07-30 542 }
fd990556f0fa25 Bartlomiej Zolnierkiewicz 2014-03-25 543 pm_runtime_enable(dev);
eac7e072d7e99f Tejun Heo 2018-08-06 544 pm_runtime_get_sync(dev);
fd990556f0fa25 Bartlomiej Zolnierkiewicz 2014-03-25 545 hpriv->got_runtime_pm = true;
fd990556f0fa25 Bartlomiej Zolnierkiewicz 2014-03-25 546
fd990556f0fa25 Bartlomiej Zolnierkiewicz 2014-03-25 547 devres_remove_group(dev, NULL);
fd990556f0fa25 Bartlomiej Zolnierkiewicz 2014-03-25 548 return hpriv;
fd990556f0fa25 Bartlomiej Zolnierkiewicz 2014-03-25 549
fd990556f0fa25 Bartlomiej Zolnierkiewicz 2014-03-25 550 err_out:
fd990556f0fa25 Bartlomiej Zolnierkiewicz 2014-03-25 551 devres_release_group(dev, NULL);
fd990556f0fa25 Bartlomiej Zolnierkiewicz 2014-03-25 @552 return ERR_PTR(rc);
fd990556f0fa25 Bartlomiej Zolnierkiewicz 2014-03-25 553 }
fd990556f0fa25 Bartlomiej Zolnierkiewicz 2014-03-25 554 EXPORT_SYMBOL_GPL(ahci_platform_get_resources);
fd990556f0fa25 Bartlomiej Zolnierkiewicz 2014-03-25 555
:::::: The code at line 552 was first introduced by commit
:::::: fd990556f0fa25446c6bfa9cf4c9e49d387d4472 ata: move library code from ahci_platform.c to libahci_platform.c
:::::: TO: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
:::::: CC: Tejun Heo <tj@kernel.org>
---
0-DAY CI Kernel Test Service
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
^ permalink raw reply [flat|nested] 5+ messages in thread
* drivers/ata/libahci_platform.c:552 ahci_platform_get_resources() warn: passing zero to 'ERR_PTR'
@ 2021-11-26 11:37 kernel test robot
0 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2021-11-26 11:37 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 4837 bytes --]
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Wang Hai <wanghai38@huawei.com>
CC: Damien Le Moal <damien.lemoal@wdc.com>
CC: Hans de Goede <hdegoede@redhat.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: a4849f6000e29235a2707f22e39da6b897bb9543
commit: 776c75010803849c1cc4f11031a2b3960ab05202 ata: ahci_platform: fix null-ptr-deref in ahci_platform_enable_regulators()
date: 6 weeks ago
:::::: branch date: 9 hours ago
:::::: commit date: 6 weeks ago
config: openrisc-randconfig-m031-20211123 (https://download.01.org/0day-ci/archive/20211126/202111261911.U7MJ2Gxb-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>
smatch warnings:
drivers/ata/libahci_platform.c:552 ahci_platform_get_resources() warn: passing zero to 'ERR_PTR'
vim +/ERR_PTR +552 drivers/ata/libahci_platform.c
b1a9edbda040a4 Antoine Tenart 2014-07-30 513
c7d7ddee7e24ee Gregory CLEMENT 2015-01-15 514 rc = ahci_platform_get_phy(hpriv, port, dev, child);
d7f76f36a8b4dc Nishka Dasgupta 2019-08-15 515 if (rc) {
d7f76f36a8b4dc Nishka Dasgupta 2019-08-15 516 of_node_put(child);
c7d7ddee7e24ee Gregory CLEMENT 2015-01-15 517 goto err_out;
d7f76f36a8b4dc Nishka Dasgupta 2019-08-15 518 }
c7d7ddee7e24ee Gregory CLEMENT 2015-01-15 519
b1a9edbda040a4 Antoine Tenart 2014-07-30 520 enabled_ports++;
b1a9edbda040a4 Antoine Tenart 2014-07-30 521 }
b1a9edbda040a4 Antoine Tenart 2014-07-30 522 if (!enabled_ports) {
b1a9edbda040a4 Antoine Tenart 2014-07-30 523 dev_warn(dev, "No port enabled\n");
b1a9edbda040a4 Antoine Tenart 2014-07-30 524 rc = -ENODEV;
b1a9edbda040a4 Antoine Tenart 2014-07-30 525 goto err_out;
b1a9edbda040a4 Antoine Tenart 2014-07-30 526 }
b1a9edbda040a4 Antoine Tenart 2014-07-30 527
b1a9edbda040a4 Antoine Tenart 2014-07-30 528 if (!hpriv->mask_port_map)
b1a9edbda040a4 Antoine Tenart 2014-07-30 529 hpriv->mask_port_map = mask_port_map;
b1a9edbda040a4 Antoine Tenart 2014-07-30 530 } else {
b1a9edbda040a4 Antoine Tenart 2014-07-30 531 /*
b1a9edbda040a4 Antoine Tenart 2014-07-30 532 * If no sub-node was found, keep this for device tree
b1a9edbda040a4 Antoine Tenart 2014-07-30 533 * compatibility
b1a9edbda040a4 Antoine Tenart 2014-07-30 534 */
c7d7ddee7e24ee Gregory CLEMENT 2015-01-15 535 rc = ahci_platform_get_phy(hpriv, 0, dev, dev->of_node);
c7d7ddee7e24ee Gregory CLEMENT 2015-01-15 536 if (rc)
acbd573354bb7b Mikko Perttunen 2014-06-17 537 goto err_out;
fd990556f0fa25 Bartlomiej Zolnierkiewicz 2014-03-25 538
c7d7ddee7e24ee Gregory CLEMENT 2015-01-15 539 rc = ahci_platform_get_regulator(hpriv, 0, dev);
c7d7ddee7e24ee Gregory CLEMENT 2015-01-15 540 if (rc == -EPROBE_DEFER)
fd990556f0fa25 Bartlomiej Zolnierkiewicz 2014-03-25 541 goto err_out;
b1a9edbda040a4 Antoine Tenart 2014-07-30 542 }
fd990556f0fa25 Bartlomiej Zolnierkiewicz 2014-03-25 543 pm_runtime_enable(dev);
eac7e072d7e99f Tejun Heo 2018-08-06 544 pm_runtime_get_sync(dev);
fd990556f0fa25 Bartlomiej Zolnierkiewicz 2014-03-25 545 hpriv->got_runtime_pm = true;
fd990556f0fa25 Bartlomiej Zolnierkiewicz 2014-03-25 546
fd990556f0fa25 Bartlomiej Zolnierkiewicz 2014-03-25 547 devres_remove_group(dev, NULL);
fd990556f0fa25 Bartlomiej Zolnierkiewicz 2014-03-25 548 return hpriv;
fd990556f0fa25 Bartlomiej Zolnierkiewicz 2014-03-25 549
fd990556f0fa25 Bartlomiej Zolnierkiewicz 2014-03-25 550 err_out:
fd990556f0fa25 Bartlomiej Zolnierkiewicz 2014-03-25 551 devres_release_group(dev, NULL);
fd990556f0fa25 Bartlomiej Zolnierkiewicz 2014-03-25 @552 return ERR_PTR(rc);
fd990556f0fa25 Bartlomiej Zolnierkiewicz 2014-03-25 553 }
fd990556f0fa25 Bartlomiej Zolnierkiewicz 2014-03-25 554 EXPORT_SYMBOL_GPL(ahci_platform_get_resources);
fd990556f0fa25 Bartlomiej Zolnierkiewicz 2014-03-25 555
:::::: The code at line 552 was first introduced by commit
:::::: fd990556f0fa25446c6bfa9cf4c9e49d387d4472 ata: move library code from ahci_platform.c to libahci_platform.c
:::::: TO: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
:::::: CC: Tejun Heo <tj@kernel.org>
---
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] 5+ messages in thread
* drivers/ata/libahci_platform.c:552 ahci_platform_get_resources() warn: passing zero to 'ERR_PTR'
@ 2021-11-18 16:54 kernel test robot
0 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2021-11-18 16:54 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 4764 bytes --]
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Wang Hai <wanghai38@huawei.com>
CC: Damien Le Moal <damien.lemoal@wdc.com>
CC: Hans de Goede <hdegoede@redhat.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 42eb8fdac2fc5d62392dcfcf0253753e821a97b0
commit: 776c75010803849c1cc4f11031a2b3960ab05202 ata: ahci_platform: fix null-ptr-deref in ahci_platform_enable_regulators()
date: 5 weeks ago
:::::: branch date: 17 hours ago
:::::: commit date: 5 weeks ago
config: nios2-randconfig-m031-20211118 (attached as .config)
compiler: nios2-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>
smatch warnings:
drivers/ata/libahci_platform.c:552 ahci_platform_get_resources() warn: passing zero to 'ERR_PTR'
vim +/ERR_PTR +552 drivers/ata/libahci_platform.c
b1a9edbda040a4 Antoine Tenart 2014-07-30 513
c7d7ddee7e24ee Gregory CLEMENT 2015-01-15 514 rc = ahci_platform_get_phy(hpriv, port, dev, child);
d7f76f36a8b4dc Nishka Dasgupta 2019-08-15 515 if (rc) {
d7f76f36a8b4dc Nishka Dasgupta 2019-08-15 516 of_node_put(child);
c7d7ddee7e24ee Gregory CLEMENT 2015-01-15 517 goto err_out;
d7f76f36a8b4dc Nishka Dasgupta 2019-08-15 518 }
c7d7ddee7e24ee Gregory CLEMENT 2015-01-15 519
b1a9edbda040a4 Antoine Tenart 2014-07-30 520 enabled_ports++;
b1a9edbda040a4 Antoine Tenart 2014-07-30 521 }
b1a9edbda040a4 Antoine Tenart 2014-07-30 522 if (!enabled_ports) {
b1a9edbda040a4 Antoine Tenart 2014-07-30 523 dev_warn(dev, "No port enabled\n");
b1a9edbda040a4 Antoine Tenart 2014-07-30 524 rc = -ENODEV;
b1a9edbda040a4 Antoine Tenart 2014-07-30 525 goto err_out;
b1a9edbda040a4 Antoine Tenart 2014-07-30 526 }
b1a9edbda040a4 Antoine Tenart 2014-07-30 527
b1a9edbda040a4 Antoine Tenart 2014-07-30 528 if (!hpriv->mask_port_map)
b1a9edbda040a4 Antoine Tenart 2014-07-30 529 hpriv->mask_port_map = mask_port_map;
b1a9edbda040a4 Antoine Tenart 2014-07-30 530 } else {
b1a9edbda040a4 Antoine Tenart 2014-07-30 531 /*
b1a9edbda040a4 Antoine Tenart 2014-07-30 532 * If no sub-node was found, keep this for device tree
b1a9edbda040a4 Antoine Tenart 2014-07-30 533 * compatibility
b1a9edbda040a4 Antoine Tenart 2014-07-30 534 */
c7d7ddee7e24ee Gregory CLEMENT 2015-01-15 535 rc = ahci_platform_get_phy(hpriv, 0, dev, dev->of_node);
c7d7ddee7e24ee Gregory CLEMENT 2015-01-15 536 if (rc)
acbd573354bb7b Mikko Perttunen 2014-06-17 537 goto err_out;
fd990556f0fa25 Bartlomiej Zolnierkiewicz 2014-03-25 538
c7d7ddee7e24ee Gregory CLEMENT 2015-01-15 539 rc = ahci_platform_get_regulator(hpriv, 0, dev);
c7d7ddee7e24ee Gregory CLEMENT 2015-01-15 540 if (rc == -EPROBE_DEFER)
fd990556f0fa25 Bartlomiej Zolnierkiewicz 2014-03-25 541 goto err_out;
b1a9edbda040a4 Antoine Tenart 2014-07-30 542 }
fd990556f0fa25 Bartlomiej Zolnierkiewicz 2014-03-25 543 pm_runtime_enable(dev);
eac7e072d7e99f Tejun Heo 2018-08-06 544 pm_runtime_get_sync(dev);
fd990556f0fa25 Bartlomiej Zolnierkiewicz 2014-03-25 545 hpriv->got_runtime_pm = true;
fd990556f0fa25 Bartlomiej Zolnierkiewicz 2014-03-25 546
fd990556f0fa25 Bartlomiej Zolnierkiewicz 2014-03-25 547 devres_remove_group(dev, NULL);
fd990556f0fa25 Bartlomiej Zolnierkiewicz 2014-03-25 548 return hpriv;
fd990556f0fa25 Bartlomiej Zolnierkiewicz 2014-03-25 549
fd990556f0fa25 Bartlomiej Zolnierkiewicz 2014-03-25 550 err_out:
fd990556f0fa25 Bartlomiej Zolnierkiewicz 2014-03-25 551 devres_release_group(dev, NULL);
fd990556f0fa25 Bartlomiej Zolnierkiewicz 2014-03-25 @552 return ERR_PTR(rc);
fd990556f0fa25 Bartlomiej Zolnierkiewicz 2014-03-25 553 }
fd990556f0fa25 Bartlomiej Zolnierkiewicz 2014-03-25 554 EXPORT_SYMBOL_GPL(ahci_platform_get_resources);
fd990556f0fa25 Bartlomiej Zolnierkiewicz 2014-03-25 555
:::::: The code at line 552 was first introduced by commit
:::::: fd990556f0fa25446c6bfa9cf4c9e49d387d4472 ata: move library code from ahci_platform.c to libahci_platform.c
:::::: TO: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
:::::: CC: Tejun Heo <tj@kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 25698 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-08-31 1:54 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-31 1:54 drivers/ata/libahci_platform.c:552 ahci_platform_get_resources() warn: passing zero to 'ERR_PTR' kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2022-07-31 7:00 kernel test robot
2022-03-17 23:52 kernel test robot
2021-11-26 11:37 kernel test robot
2021-11-18 16:54 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.