Re: [PATCH V5 2/2] thermal: max77620: Add thermal driver for reporting junction temp

From: kbuild test robot
Date: Tue Aug 23 2016 - 04:40:26 EST


Hi Laxman,

[auto build test WARNING on thermal/next]
[also build test WARNING on next-20160823]
[cannot apply to v4.8-rc3]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
[Suggest to use git(>=2.9.0) format-patch --base=<commit> (or --base=auto for convenience) to record what (public, well-known) commit your patch series was built on]
[Check https://git-scm.com/docs/git-format-patch for more information]

url: https://github.com/0day-ci/linux/commits/Laxman-Dewangan/thermal-max77620-Add-DT-binding-doc-for-thermal-driver/20160823-151342
base: https://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux.git next
config: x86_64-allmodconfig (attached as .config)
compiler: gcc-6 (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64

All warnings (new ones prefixed by >>):

drivers/thermal/max77620_thermal.c: In function 'max77620_thermal_probe':
>> drivers/thermal/max77620_thermal.c:95:5: warning: 'mtherm' is used uninitialized in this function [-Wuninitialized]
if (!mtherm)
^

vim +/mtherm +95 drivers/thermal/max77620_thermal.c

79
80 if (irq == mtherm->irq_tjalarm1)
81 dev_warn(mtherm->dev, "Junction Temp Alarm1(120C) occurred\n");
82 else if (irq == mtherm->irq_tjalarm2)
83 dev_crit(mtherm->dev, "Junction Temp Alarm2(140C) occurred\n");
84
85 thermal_zone_device_update(mtherm->tz_device);
86
87 return IRQ_HANDLED;
88 }
89
90 static int max77620_thermal_probe(struct platform_device *pdev)
91 {
92 struct max77620_therm_info *mtherm;
93 int ret;
94
> 95 if (!mtherm)
96 return -ENOMEM;
97
98 mtherm->irq_tjalarm1 = platform_get_irq(pdev, 0);
99 mtherm->irq_tjalarm2 = platform_get_irq(pdev, 1);
100 if ((mtherm->irq_tjalarm1 < 0) || (mtherm->irq_tjalarm2 < 0)) {
101 dev_err(&pdev->dev, "Alarm irq number not available\n");
102 return -EINVAL;
103 }

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Attachment: .config.gz
Description: Binary data