iio: adc: xilinx-xadc: Drop duplicate NULL check in xadc_parse_dt()
The fwnode_for_each_child_node() is NULL-aware, no need to check its parameters outside. Drop duplicate NULL check in xadc_parse_dt(). Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20220531141118.64540-2-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
parent
59b2947ed4
commit
568f6869e6
@ -1247,7 +1247,6 @@ static int xadc_parse_dt(struct iio_dev *indio_dev, unsigned int *conf, int irq)
|
||||
chan = &channels[9];
|
||||
|
||||
chan_node = device_get_named_child_node(dev, "xlnx,channels");
|
||||
if (chan_node) {
|
||||
fwnode_for_each_child_node(chan_node, child) {
|
||||
if (num_channels >= max_channels) {
|
||||
fwnode_handle_put(child);
|
||||
@ -1271,7 +1270,6 @@ static int xadc_parse_dt(struct iio_dev *indio_dev, unsigned int *conf, int irq)
|
||||
num_channels++;
|
||||
chan++;
|
||||
}
|
||||
}
|
||||
fwnode_handle_put(chan_node);
|
||||
|
||||
/* No IRQ => no events */
|
||||
|
Loading…
Reference in New Issue
Block a user