From ee06e644d06bf74534affc312e962e9bc2477a39 Mon Sep 17 00:00:00 2001 From: Xingxing Wang Date: Mon, 18 Aug 2025 14:12:49 +0800 Subject: [PATCH] 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 --- drivers/thermal/meson_tsensor.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/thermal/meson_tsensor.c b/drivers/thermal/meson_tsensor.c index fdc47f7c6..b9c10a4ae 100644 --- a/drivers/thermal/meson_tsensor.c +++ b/drivers/thermal/meson_tsensor.c @@ -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;