Local variable ret is declared as unsigned but is used to receive the
return value of functions that return int. ret is then tested for being
negative which must always fail. Change ret to be an int.
This issue was found by Smatch.
Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
static int imx93_adc_probe(struct udevice *dev)
{
struct imx93_adc_priv *adc = dev_get_priv(dev);
- unsigned int ret;
+ int ret;
ret = imx93_adc_calibration(adc);
if (ret < 0)
{
struct adc_uclass_plat *uc_pdata = dev_get_uclass_plat(dev);
struct imx93_adc_priv *adc = dev_get_priv(dev);
- unsigned int ret;
+ int ret;
adc->regs = dev_read_addr_ptr(dev);
if (adc->regs == (struct imx93_adc *)FDT_ADDR_T_NONE) {