[bug report] hwmon: Add support for Amphenol ChipCap 2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Javier Carrasco,

The patch 33c41faa98f3: "hwmon: Add support for Amphenol ChipCap 2"
from Jan 30, 2024 (linux-next), leads to the following Smatch static
checker warning:

drivers/hwmon/chipcap2.c:327 cc2_get_reg_val() error: uninitialized symbol 'reg_val'.
drivers/hwmon/chipcap2.c:695 cc2_request_alarm_irqs() error: uninitialized symbol 'ret'.

drivers/hwmon/chipcap2.c
    669 static int cc2_request_alarm_irqs(struct cc2_data *data, struct device *dev)
    670 {
    671         int ret;

Set this to ret = -ENODEV?

    672 
    673         data->irq_low = fwnode_irq_get_byname(dev_fwnode(dev), "low");
    674         if (data->irq_low > 0) {
    675                 ret = devm_request_threaded_irq(dev, data->irq_low, NULL,
    676                                                 cc2_low_interrupt,
    677                                                 IRQF_ONESHOT |
    678                                                 IRQF_TRIGGER_RISING,
    679                                                 dev_name(dev), data);
    680                 if (!ret)
    681                         data->rh_alarm.low_alarm_visible = true;
    682         }
    683 
    684         data->irq_high = fwnode_irq_get_byname(dev_fwnode(dev), "high");
    685         if (data->irq_high > 0) {
    686                 ret = devm_request_threaded_irq(dev, data->irq_high, NULL,
    687                                                 cc2_high_interrupt,
    688                                                 IRQF_ONESHOT |
    689                                                 IRQF_TRIGGER_RISING,
    690                                                 dev_name(dev), data);
    691                 if (!ret)
    692                         data->rh_alarm.high_alarm_visible = true;
    693         }
    694 
--> 695         return ret;
    696 }

regards,
dan carpenter




[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux