mirror of
https://github.com/torvalds/linux.git
synced 2026-06-01 02:53:36 +02:00
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>
This commit is contained in:
parent
fe1846f61a
commit
976df66573
|
|
@ -942,18 +942,15 @@ static int axi_dac_probe(struct platform_device *pdev)
|
|||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (ADI_AXI_PCORE_VER_MAJOR(ver) !=
|
||||
ADI_AXI_PCORE_VER_MAJOR(st->info->version)) {
|
||||
dev_err(dev,
|
||||
"Major version mismatch. Expected %d.%.2d.%c, Reported %d.%.2d.%c\n",
|
||||
ADI_AXI_PCORE_VER_MAJOR(st->info->version),
|
||||
ADI_AXI_PCORE_VER_MINOR(st->info->version),
|
||||
ADI_AXI_PCORE_VER_PATCH(st->info->version),
|
||||
ADI_AXI_PCORE_VER_MAJOR(ver),
|
||||
ADI_AXI_PCORE_VER_MINOR(ver),
|
||||
ADI_AXI_PCORE_VER_PATCH(ver));
|
||||
return -ENODEV;
|
||||
}
|
||||
if (ADI_AXI_PCORE_VER_MAJOR(ver) != ADI_AXI_PCORE_VER_MAJOR(st->info->version))
|
||||
return dev_err_probe(dev, -ENODEV,
|
||||
"Major version mismatch. Expected %d.%.2d.%c, Reported %d.%.2d.%c\n",
|
||||
ADI_AXI_PCORE_VER_MAJOR(st->info->version),
|
||||
ADI_AXI_PCORE_VER_MINOR(st->info->version),
|
||||
ADI_AXI_PCORE_VER_PATCH(st->info->version),
|
||||
ADI_AXI_PCORE_VER_MAJOR(ver),
|
||||
ADI_AXI_PCORE_VER_MINOR(ver),
|
||||
ADI_AXI_PCORE_VER_PATCH(ver));
|
||||
|
||||
/* Let's get the core read only configuration */
|
||||
ret = regmap_read(st->regmap, AXI_DAC_CONFIG_REG, &st->reg_config);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user