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: dac: adi-axi-dac: Make use of dev_err_probe()

Be consistent and use dev_err_probe() as in all other places in the
.probe() path.

While at it, remove the line break in the version condition. Yes, it
goes over the 80 column limit but I do think the line break hurts
readability in this case.

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
976df665 fe1846f6

+9 -12
+9 -12
drivers/iio/dac/adi-axi-dac.c
··· 942 942 if (ret) 943 943 return ret; 944 944 945 - if (ADI_AXI_PCORE_VER_MAJOR(ver) != 946 - ADI_AXI_PCORE_VER_MAJOR(st->info->version)) { 947 - dev_err(dev, 948 - "Major version mismatch. Expected %d.%.2d.%c, Reported %d.%.2d.%c\n", 949 - ADI_AXI_PCORE_VER_MAJOR(st->info->version), 950 - ADI_AXI_PCORE_VER_MINOR(st->info->version), 951 - ADI_AXI_PCORE_VER_PATCH(st->info->version), 952 - ADI_AXI_PCORE_VER_MAJOR(ver), 953 - ADI_AXI_PCORE_VER_MINOR(ver), 954 - ADI_AXI_PCORE_VER_PATCH(ver)); 955 - return -ENODEV; 956 - } 945 + if (ADI_AXI_PCORE_VER_MAJOR(ver) != ADI_AXI_PCORE_VER_MAJOR(st->info->version)) 946 + return dev_err_probe(dev, -ENODEV, 947 + "Major version mismatch. Expected %d.%.2d.%c, Reported %d.%.2d.%c\n", 948 + ADI_AXI_PCORE_VER_MAJOR(st->info->version), 949 + ADI_AXI_PCORE_VER_MINOR(st->info->version), 950 + ADI_AXI_PCORE_VER_PATCH(st->info->version), 951 + ADI_AXI_PCORE_VER_MAJOR(ver), 952 + ADI_AXI_PCORE_VER_MINOR(ver), 953 + ADI_AXI_PCORE_VER_PATCH(ver)); 957 954 958 955 /* Let's get the core read only configuration */ 959 956 ret = regmap_read(st->regmap, AXI_DAC_CONFIG_REG, &st->reg_config);