mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-08-06 07:17:01 +02:00
imx93: adc: local variable ret should not be unsigned
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>
This commit is contained in:
parent
e6e8c601ed
commit
110a23e479
@ -221,7 +221,7 @@ static int imx93_adc_stop(struct udevice *dev)
|
||||
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)
|
||||
@ -238,7 +238,7 @@ static int imx93_adc_of_to_plat(struct udevice *dev)
|
||||
{
|
||||
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) {
|
||||
|
Loading…
Reference in New Issue
Block a user