* drivers/gpu/drm/rockchip/rockchip_drm_vop.c:2148 vop_bind() warn: missing error code 'ret'
@ 2021-05-25 11:16 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-05-25 11:16 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 8518 bytes --]
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Robin Murphy <robin.murphy@arm.com>
CC: Joerg Roedel <jroedel@suse.de>
Hi Robin,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: a050a6d2b7e80ca52b2f4141eaf3420d201b72b3
commit: b4ceb4a5359ed1c9ba4a20acf3a70d4bbead3248 iommu: Tidy up Kconfig for SoC IOMMUs
date: 11 months ago
:::::: branch date: 9 hours ago
:::::: commit date: 11 months ago
config: microblaze-randconfig-m031-20210525 (attached as .config)
compiler: microblaze-linux-gcc (GCC) 9.3.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/gpu/drm/rockchip/rockchip_drm_vop.c:2148 vop_bind() warn: missing error code 'ret'
vim +/ret +2148 drivers/gpu/drm/rockchip/rockchip_drm_vop.c
69c34e41f5d4e8 Yakir Yang 2016-07-24 2067
2048e3286f347d Mark Yao 2014-08-22 2068 static int vop_bind(struct device *dev, struct device *master, void *data)
2048e3286f347d Mark Yao 2014-08-22 2069 {
2048e3286f347d Mark Yao 2014-08-22 2070 struct platform_device *pdev = to_platform_device(dev);
2048e3286f347d Mark Yao 2014-08-22 2071 const struct vop_data *vop_data;
2048e3286f347d Mark Yao 2014-08-22 2072 struct drm_device *drm_dev = data;
2048e3286f347d Mark Yao 2014-08-22 2073 struct vop *vop;
2048e3286f347d Mark Yao 2014-08-22 2074 struct resource *res;
3ea68922fc4148 Heiko Stuebner 2015-04-20 2075 int ret, irq;
2048e3286f347d Mark Yao 2014-08-22 2076
a67719d182291b Mark Yao 2015-12-15 2077 vop_data = of_device_get_match_data(dev);
2048e3286f347d Mark Yao 2014-08-22 2078 if (!vop_data)
2048e3286f347d Mark Yao 2014-08-22 2079 return -ENODEV;
2048e3286f347d Mark Yao 2014-08-22 2080
2048e3286f347d Mark Yao 2014-08-22 2081 /* Allocate vop struct and its vop_win array */
29adeb4f954b2e Gustavo A. R. Silva 2018-08-26 2082 vop = devm_kzalloc(dev, struct_size(vop, win, vop_data->win_size),
29adeb4f954b2e Gustavo A. R. Silva 2018-08-26 2083 GFP_KERNEL);
2048e3286f347d Mark Yao 2014-08-22 2084 if (!vop)
2048e3286f347d Mark Yao 2014-08-22 2085 return -ENOMEM;
2048e3286f347d Mark Yao 2014-08-22 2086
2048e3286f347d Mark Yao 2014-08-22 2087 vop->dev = dev;
2048e3286f347d Mark Yao 2014-08-22 2088 vop->data = vop_data;
2048e3286f347d Mark Yao 2014-08-22 2089 vop->drm_dev = drm_dev;
2048e3286f347d Mark Yao 2014-08-22 2090 dev_set_drvdata(dev, vop);
2048e3286f347d Mark Yao 2014-08-22 2091
2048e3286f347d Mark Yao 2014-08-22 2092 vop_win_init(vop);
2048e3286f347d Mark Yao 2014-08-22 2093
2048e3286f347d Mark Yao 2014-08-22 2094 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
2048e3286f347d Mark Yao 2014-08-22 2095 vop->len = resource_size(res);
2048e3286f347d Mark Yao 2014-08-22 2096 vop->regs = devm_ioremap_resource(dev, res);
2048e3286f347d Mark Yao 2014-08-22 2097 if (IS_ERR(vop->regs))
2048e3286f347d Mark Yao 2014-08-22 2098 return PTR_ERR(vop->regs);
2048e3286f347d Mark Yao 2014-08-22 2099
b23ab6ac6d768f Ezequiel Garcia 2019-10-10 2100 res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
b23ab6ac6d768f Ezequiel Garcia 2019-10-10 2101 if (res) {
b23ab6ac6d768f Ezequiel Garcia 2019-10-10 2102 if (!vop_data->lut_size) {
b23ab6ac6d768f Ezequiel Garcia 2019-10-10 2103 DRM_DEV_ERROR(dev, "no gamma LUT size defined\n");
b23ab6ac6d768f Ezequiel Garcia 2019-10-10 2104 return -EINVAL;
b23ab6ac6d768f Ezequiel Garcia 2019-10-10 2105 }
b23ab6ac6d768f Ezequiel Garcia 2019-10-10 2106 vop->lut_regs = devm_ioremap_resource(dev, res);
b23ab6ac6d768f Ezequiel Garcia 2019-10-10 2107 if (IS_ERR(vop->lut_regs))
b23ab6ac6d768f Ezequiel Garcia 2019-10-10 2108 return PTR_ERR(vop->lut_regs);
b23ab6ac6d768f Ezequiel Garcia 2019-10-10 2109 }
b23ab6ac6d768f Ezequiel Garcia 2019-10-10 2110
2048e3286f347d Mark Yao 2014-08-22 2111 vop->regsbak = devm_kzalloc(dev, vop->len, GFP_KERNEL);
2048e3286f347d Mark Yao 2014-08-22 2112 if (!vop->regsbak)
2048e3286f347d Mark Yao 2014-08-22 2113 return -ENOMEM;
2048e3286f347d Mark Yao 2014-08-22 2114
3ea68922fc4148 Heiko Stuebner 2015-04-20 2115 irq = platform_get_irq(pdev, 0);
3ea68922fc4148 Heiko Stuebner 2015-04-20 2116 if (irq < 0) {
d8dd68045c5879 Haneen Mohammed 2017-09-15 2117 DRM_DEV_ERROR(dev, "cannot find irq for vop\n");
3ea68922fc4148 Heiko Stuebner 2015-04-20 2118 return irq;
2048e3286f347d Mark Yao 2014-08-22 2119 }
3ea68922fc4148 Heiko Stuebner 2015-04-20 2120 vop->irq = (unsigned int)irq;
2048e3286f347d Mark Yao 2014-08-22 2121
2048e3286f347d Mark Yao 2014-08-22 2122 spin_lock_init(&vop->reg_lock);
2048e3286f347d Mark Yao 2014-08-22 2123 spin_lock_init(&vop->irq_lock);
e334d48b2cd4aa zain wang 2018-03-09 2124 mutex_init(&vop->vop_lock);
2048e3286f347d Mark Yao 2014-08-22 2125
2048e3286f347d Mark Yao 2014-08-22 2126 ret = vop_create_crtc(vop);
2048e3286f347d Mark Yao 2014-08-22 2127 if (ret)
5f9e93fed4d45e Marc Zyngier 2018-02-20 2128 return ret;
2048e3286f347d Mark Yao 2014-08-22 2129
2048e3286f347d Mark Yao 2014-08-22 2130 pm_runtime_enable(&pdev->dev);
5182c1a556d7ff Yakir Yang 2016-07-24 2131
5e570373c015b6 Jeffy Chen 2017-04-06 2132 ret = vop_initial(vop);
5e570373c015b6 Jeffy Chen 2017-04-06 2133 if (ret < 0) {
d8dd68045c5879 Haneen Mohammed 2017-09-15 2134 DRM_DEV_ERROR(&pdev->dev,
d8dd68045c5879 Haneen Mohammed 2017-09-15 2135 "cannot initial vop dev - err %d\n", ret);
5e570373c015b6 Jeffy Chen 2017-04-06 2136 goto err_disable_pm_runtime;
5e570373c015b6 Jeffy Chen 2017-04-06 2137 }
5e570373c015b6 Jeffy Chen 2017-04-06 2138
5f9e93fed4d45e Marc Zyngier 2018-02-20 2139 ret = devm_request_irq(dev, vop->irq, vop_isr,
5f9e93fed4d45e Marc Zyngier 2018-02-20 2140 IRQF_SHARED, dev_name(dev), vop);
5f9e93fed4d45e Marc Zyngier 2018-02-20 2141 if (ret)
5f9e93fed4d45e Marc Zyngier 2018-02-20 2142 goto err_disable_pm_runtime;
5f9e93fed4d45e Marc Zyngier 2018-02-20 2143
1f0f0151517278 Sandy Huang 2018-08-30 2144 if (vop->data->feature & VOP_FEATURE_INTERNAL_RGB) {
1f0f0151517278 Sandy Huang 2018-08-30 2145 vop->rgb = rockchip_rgb_init(dev, &vop->crtc, vop->drm_dev);
1f0f0151517278 Sandy Huang 2018-08-30 2146 if (IS_ERR(vop->rgb)) {
1f0f0151517278 Sandy Huang 2018-08-30 2147 ret = PTR_ERR(vop->rgb);
1f0f0151517278 Sandy Huang 2018-08-30 @2148 goto err_disable_pm_runtime;
1f0f0151517278 Sandy Huang 2018-08-30 2149 }
1f0f0151517278 Sandy Huang 2018-08-30 2150 }
1f0f0151517278 Sandy Huang 2018-08-30 2151
2048e3286f347d Mark Yao 2014-08-22 2152 return 0;
8c763c9b1072c9 Sean Paul 2016-09-16 2153
5e570373c015b6 Jeffy Chen 2017-04-06 2154 err_disable_pm_runtime:
5e570373c015b6 Jeffy Chen 2017-04-06 2155 pm_runtime_disable(&pdev->dev);
5e570373c015b6 Jeffy Chen 2017-04-06 2156 vop_destroy_crtc(vop);
8c763c9b1072c9 Sean Paul 2016-09-16 2157 return ret;
2048e3286f347d Mark Yao 2014-08-22 2158 }
2048e3286f347d Mark Yao 2014-08-22 2159
:::::: The code at line 2148 was first introduced by commit
:::::: 1f0f015151727872be866b6a5b64e07f9e7a3071 drm/rockchip: Add support for Rockchip Soc RGB output interface
:::::: TO: Sandy Huang <hjc@rock-chips.com>
:::::: CC: Heiko Stuebner <heiko@sntech.de>
---
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: 35582 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-05-25 11:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-25 11:16 drivers/gpu/drm/rockchip/rockchip_drm_vop.c:2148 vop_bind() warn: missing error code 'ret' 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.