drivers/gpu/drm/bridge/synopsys/dw-dp.c:2080 dw_dp_bind() warn: passing zero to 'ERR_PTR'
From: Dan Carpenter
Date: Mon Dec 15 2025 - 04:22:24 EST
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 8f0b4cce4481fb22653697cced8d0d04027cb1e8
commit: d68ba7bac9555d05e2f5b310c898b2a5c7eff174 drm/rockchip: Add RK3588 DPTX output support
config: arm64-randconfig-r071-20251215 (https://download.01.org/0day-ci/archive/20251215/202512151515.PjP26FTp-lkp@xxxxxxxxx/config)
compiler: aarch64-linux-gcc (GCC) 10.5.0
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
| Closes: https://lore.kernel.org/r/202512151515.PjP26FTp-lkp@xxxxxxxxx/
New smatch warnings:
drivers/gpu/drm/bridge/synopsys/dw-dp.c:2080 dw_dp_bind() warn: passing zero to 'ERR_PTR'
vim +/ERR_PTR +2080 drivers/gpu/drm/bridge/synopsys/dw-dp.c
86eecc3a9c2e06 Andy Yan 2025-08-22 2068 ret = phy_init(dp->phy);
86eecc3a9c2e06 Andy Yan 2025-08-22 2069 if (ret) {
86eecc3a9c2e06 Andy Yan 2025-08-22 2070 dev_err_probe(dev, ret, "phy init failed\n");
86eecc3a9c2e06 Andy Yan 2025-08-22 2071 return ERR_PTR(ret);
86eecc3a9c2e06 Andy Yan 2025-08-22 2072 }
86eecc3a9c2e06 Andy Yan 2025-08-22 2073
86eecc3a9c2e06 Andy Yan 2025-08-22 2074 ret = devm_add_action_or_reset(dev, dw_dp_phy_exit, dp);
86eecc3a9c2e06 Andy Yan 2025-08-22 2075 if (ret)
86eecc3a9c2e06 Andy Yan 2025-08-22 2076 return ERR_PTR(ret);
86eecc3a9c2e06 Andy Yan 2025-08-22 2077
86eecc3a9c2e06 Andy Yan 2025-08-22 2078 dp->irq = platform_get_irq(pdev, 0);
86eecc3a9c2e06 Andy Yan 2025-08-22 2079 if (dp->irq < 0)
86eecc3a9c2e06 Andy Yan 2025-08-22 @2080 return ERR_PTR(ret);
s/ret/dp->irq/
86eecc3a9c2e06 Andy Yan 2025-08-22 2081
86eecc3a9c2e06 Andy Yan 2025-08-22 2082 ret = devm_request_threaded_irq(dev, dp->irq, NULL, dw_dp_irq,
86eecc3a9c2e06 Andy Yan 2025-08-22 2083 IRQF_ONESHOT, dev_name(dev), dp);
86eecc3a9c2e06 Andy Yan 2025-08-22 2084 if (ret) {
86eecc3a9c2e06 Andy Yan 2025-08-22 2085 dev_err_probe(dev, ret, "failed to request irq\n");
86eecc3a9c2e06 Andy Yan 2025-08-22 2086 return ERR_PTR(ret);
86eecc3a9c2e06 Andy Yan 2025-08-22 2087 }
86eecc3a9c2e06 Andy Yan 2025-08-22 2088
86eecc3a9c2e06 Andy Yan 2025-08-22 2089 return dp;
86eecc3a9c2e06 Andy Yan 2025-08-22 2090 }
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki