Content-Type: multipart/mixed; boundary="===============6394563901515100480==" MIME-Version: 1.0 From: Julia Lawall To: kbuild-all@lists.01.org Subject: [daniel.lezcano:thermal/linux-next 11/16] drivers/thermal/qcom/tsens.c:123:1-7: ERROR: missing put_device; call of_find_device_by_node on line 103, but without a corresponding object release within this function. (fwd) Date: Thu, 17 Oct 2019 12:24:26 +0200 Message-ID: List-Id: --===============6394563901515100480== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hello, Perhaps pdev should be released or save somewhere before leaving the function. If this is a false positive, I can update the rule. julia ---------- Forwarded message ---------- Date: Thu, 17 Oct 2019 18:06:41 +0800 From: kbuild test robot To: kbuild(a)lists.01.org Cc: Julia Lawall Subject: [daniel.lezcano:thermal/linux-next 11/16] drivers/thermal/qcom/tsens.c:123:1-7: ERROR: missing put_device; call of_find_device_by_node on line 103, but without a corresponding object release within this function. CC: kbuild-all(a)lists.01.org TO: Amit Kucheria CC: Daniel Lezcano CC: Stephen Boyd tree: http://git.linaro.org/people/daniel.lezcano/linux thermal/linux-next head: 124d92b700811381a477ca6b38d1c98417894f0e commit: cd376943ac255b0b0b299307c12f6bdb28b825a2 [11/16] drivers: thermal: = tsens: Add interrupt support :::::: branch date: 16 hours ago :::::: commit date: 25 hours ago If you fix the issue, kindly add following tag Reported-by: kbuild test robot Reported-by: Julia Lawall >> drivers/thermal/qcom/tsens.c:123:1-7: ERROR: missing put_device; call of= _find_device_by_node on line 103, but without a corresponding object releas= e within this function. git remote add daniel.lezcano http://git.linaro.org/people/daniel.lezcano/l= inux git remote update daniel.lezcano git checkout cd376943ac255b0b0b299307c12f6bdb28b825a2 vim +123 drivers/thermal/qcom/tsens.c 9066073c6c2799 Rajendra Nayak 2016-05-05 84 69b628ac71f07d Amit Kucheria 2019-03-20 85 static int tsens_register(st= ruct tsens_priv *priv) 9066073c6c2799 Rajendra Nayak 2016-05-05 86 { cd376943ac255b Amit Kucheria 2019-10-16 87 int i, ret, irq; 9066073c6c2799 Rajendra Nayak 2016-05-05 88 struct thermal_zone_device = *tzd; cd376943ac255b Amit Kucheria 2019-10-16 89 struct platform_device *pde= v; 9066073c6c2799 Rajendra Nayak 2016-05-05 90 69b628ac71f07d Amit Kucheria 2019-03-20 91 for (i =3D 0; i < priv->nu= m_sensors; i++) { 69b628ac71f07d Amit Kucheria 2019-03-20 92 priv->sensor[i].priv =3D p= riv; 3e68159d5fdf29 Amit Kucheria 2019-10-16 93 tzd =3D devm_thermal_zone_= of_sensor_register(priv->dev, priv->sensor[i].hw_id, 69b628ac71f07d Amit Kucheria 2019-03-20 94 &priv->sensor[i], 9066073c6c2799 Rajendra Nayak 2016-05-05 95 &tsens_of_ops); 9066073c6c2799 Rajendra Nayak 2016-05-05 96 if (IS_ERR(tzd)) 9066073c6c2799 Rajendra Nayak 2016-05-05 97 continue; 69b628ac71f07d Amit Kucheria 2019-03-20 98 priv->sensor[i].tzd =3D tz= d; 69b628ac71f07d Amit Kucheria 2019-03-20 99 if (priv->ops->enable) 69b628ac71f07d Amit Kucheria 2019-03-20 100 priv->ops->enable(priv, i= ); 9066073c6c2799 Rajendra Nayak 2016-05-05 101 } cd376943ac255b Amit Kucheria 2019-10-16 102 cd376943ac255b Amit Kucheria 2019-10-16 @103 pdev =3D of_find_device_by_= node(priv->dev->of_node); cd376943ac255b Amit Kucheria 2019-10-16 104 if (!pdev) cd376943ac255b Amit Kucheria 2019-10-16 105 return -ENODEV; cd376943ac255b Amit Kucheria 2019-10-16 106 cd376943ac255b Amit Kucheria 2019-10-16 107 irq =3D platform_get_irq_by= name(pdev, "uplow"); cd376943ac255b Amit Kucheria 2019-10-16 108 if (irq < 0) { cd376943ac255b Amit Kucheria 2019-10-16 109 ret =3D irq; cd376943ac255b Amit Kucheria 2019-10-16 110 goto err_put_device; cd376943ac255b Amit Kucheria 2019-10-16 111 } cd376943ac255b Amit Kucheria 2019-10-16 112 cd376943ac255b Amit Kucheria 2019-10-16 113 ret =3D devm_request_thread= ed_irq(&pdev->dev, irq, cd376943ac255b Amit Kucheria 2019-10-16 114 NULL, tsens_irq_thread, cd376943ac255b Amit Kucheria 2019-10-16 115 IRQF_TRIGGER_HIGH | IRQ= F_ONESHOT, cd376943ac255b Amit Kucheria 2019-10-16 116 dev_name(&pdev->dev), p= riv); cd376943ac255b Amit Kucheria 2019-10-16 117 if (ret) { cd376943ac255b Amit Kucheria 2019-10-16 118 dev_err(&pdev->dev, "%s: f= ailed to get irq\n", __func__); cd376943ac255b Amit Kucheria 2019-10-16 119 goto err_put_device; cd376943ac255b Amit Kucheria 2019-10-16 120 } cd376943ac255b Amit Kucheria 2019-10-16 121 cd376943ac255b Amit Kucheria 2019-10-16 122 enable_irq_wake(irq); 9066073c6c2799 Rajendra Nayak 2016-05-05 @123 return 0; cd376943ac255b Amit Kucheria 2019-10-16 124 cd376943ac255b Amit Kucheria 2019-10-16 125 err_put_device: cd376943ac255b Amit Kucheria 2019-10-16 126 put_device(&pdev->dev); cd376943ac255b Amit Kucheria 2019-10-16 127 return ret; 9066073c6c2799 Rajendra Nayak 2016-05-05 128 } 9066073c6c2799 Rajendra Nayak 2016-05-05 129 :::::: The code at line 123 was first introduced by commit :::::: 9066073c6c27994a30187abf3b674770b4088348 thermal: qcom: tsens: Add a= skeletal TSENS drivers :::::: TO: Rajendra Nayak :::::: CC: Zhang Rui --- 0-DAY kernel test infrastructure Open Source Technology Cent= er https://lists.01.org/pipermail/kbuild-all Intel Corporati= on --===============6394563901515100480==--