Hello Mihail Chindris, The patch 8f2b54824b28: "drivers:iio:dac: Add AD3552R driver support" from Dec 13, 2021, leads to the following Smatch static checker warning: drivers/iio/dac/ad3552r.c:688 ad3552r_reset() warn: impossible condition '(val < 0) => (0-u16max < 0)' drivers/iio/dac/ad3552r.c:699 ad3552r_reset() warn: impossible condition '(val < 0) => (0-u16max < 0)' drivers/iio/dac/ad3552r.c 655 static int ad3552r_reset(struct ad3552r_desc *dac) 656 { 657 struct reg_addr_pool addr; 658 int ret; 659 u16 val; ^^^^^^^ 660 661 dac->gpio_reset = devm_gpiod_get_optional(&dac->spi->dev, "reset", 662 GPIOD_OUT_LOW); 663 if (IS_ERR(dac->gpio_reset)) 664 return dev_err_probe(&dac->spi->dev, PTR_ERR(dac->gpio_reset), 665 "Error while getting gpio reset"); 666 667 if (dac->gpio_reset) { 668 /* Perform hardware reset */ 669 usleep_range(10, 20); 670 gpiod_set_value_cansleep(dac->gpio_reset, 1); 671 } else { 672 /* Perform software reset if no GPIO provided */ 673 ret = ad3552r_update_reg_field(dac, 674 AD3552R_REG_ADDR_INTERFACE_CONFIG_A, 675 AD3552R_MASK_SOFTWARE_RESET, 676 AD3552R_MASK_SOFTWARE_RESET); 677 if (ret < 0) 678 return ret; 679 680 } 681 682 addr.dac = dac; 683 addr.addr = AD3552R_REG_ADDR_INTERFACE_CONFIG_B; 684 ret = readx_poll_timeout(ad3552r_read_reg_wrapper, &addr, val, 685 val == AD3552R_DEFAULT_CONFIG_B_VALUE || 686 val < 0, ^^^^^^^ Unsigned can't be < 0. 687 5000, 50000); --> 688 if (val < 0) ^^^^^^^ 689 ret = val; 690 if (ret) { 691 dev_err(&dac->spi->dev, "Error while resetting"); 692 return ret; 693 } 694 695 ret = readx_poll_timeout(ad3552r_read_reg_wrapper, &addr, val, 696 !(val & AD3552R_MASK_INTERFACE_NOT_READY) || 697 val < 0, ^^^^^^^ 698 5000, 50000); 699 if (val < 0) ^^^^^^^ 700 ret = val; 701 if (ret) { 702 dev_err(&dac->spi->dev, "Error while resetting"); 703 return ret; 704 } 705 706 return ad3552r_update_reg_field(dac, 707 addr_mask_map[AD3552R_ADDR_ASCENSION][0], 708 addr_mask_map[AD3552R_ADDR_ASCENSION][1], 709 val); 710 } regards, dan carpenter