thermal: coverity scan issue on kernel5.15 [1/1]

PD#TV-168594

Problem:
thermal coverity issue

Solution:
resolve thermal coverity issues
sync from 5.15: https://scgit.amlogic.com/#/c/561624/

Verify:
kernel5.15 trunk

Change-Id: I3592137af7e6bacc30d8c947b5a4c2b98c3f67c9
Signed-off-by: Xingxing Wang <xingxing.wang@amlogic.com>
This commit is contained in:
Xingxing Wang
2025-08-18 14:12:49 +08:00
committed by gerrit autosubmit
parent fdda91766e
commit ee06e644d0
+5 -4
View File
@@ -693,8 +693,8 @@ static int meson_map_dt_data(struct platform_device *pdev)
data->rst = devm_reset_control_get(&pdev->dev, "ts_rst");
if (IS_ERR(data->rst))
dev_warn(&pdev->dev, "Does not support reset func..\n");
else
reset_control_deassert(data->rst);
else if (reset_control_deassert(data->rst))
dev_err(&pdev->dev, "Release sensor's reset failed!!!...\n");
if (of_address_to_resource(pdev->dev.of_node, 0, &res)) {
dev_err(&pdev->dev, "failed to get Resource 0\n");
@@ -760,8 +760,9 @@ static int meson_map_dt_data(struct platform_device *pdev)
*/
if (of_property_read_bool(pdev->dev.of_node, "cal_coeff2")) {
if (!(data->trim_info & 0x70000000))
of_property_read_u32_array(pdev->dev.of_node, "cal_coeff2",
&pdata->cal_coeff[0], R1P1_CAL_NUM);
if (of_property_read_u32_array(pdev->dev.of_node, "cal_coeff2",
&pdata->cal_coeff[0], R1P1_CAL_NUM))
dev_err(&pdev->dev, "cal_coeff2 error\n");
}
data->pdata = pdata;