The fwnode_get_named_child_node() function does not return error
pointers. It returns NULL. Update the check accordingly.
Fixes: 8f2b54824b ("drivers:iio:dac: Add AD3552R driver support")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20220404114244.GA19201@kili
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
The "val" variable is used to store either negative error codes from
ad3552r_read_reg_wrapper() or positive u16 values on success. It needs
to be signed for the error handling to work correctly.
Fixes: 8f2b54824b ("drivers:iio:dac: Add AD3552R driver support")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20220316122354.GA16825@kili
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>