Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

iio: adc: adi-axi-adc: Slightly simplify axi_adc_create_platform_device()

There's no point in having a ret variable and checking for errors (as we
do nothing with it). Instead, save some lines of code and directly
return the devm_add_action_or_reset() call.

Reviewed-by: Andy Shevchenko <andy@kernel.org>
Signed-off-by: Nuno Sá <nuno.sa@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Nuno Sá and committed by
Jonathan Cameron
0a272aaf 634a6316

+1 -6
+1 -6
drivers/iio/adc/adi-axi-adc.c
··· 591 591 .size_data = st->info->pdata_sz, 592 592 }; 593 593 struct platform_device *pdev; 594 - int ret; 595 594 596 595 pdev = platform_device_register_full(&pi); 597 596 if (IS_ERR(pdev)) 598 597 return PTR_ERR(pdev); 599 598 600 - ret = devm_add_action_or_reset(st->dev, axi_adc_child_remove, pdev); 601 - if (ret) 602 - return ret; 603 - 604 - return 0; 599 + return devm_add_action_or_reset(st->dev, axi_adc_child_remove, pdev); 605 600 } 606 601 607 602 static const struct iio_backend_ops adi_axi_adc_ops = {