mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 00:22:00 +02:00
gpio: 74x164: Switch to use dev_err_probe()
Switch to use dev_err_probe() to simplify the error path and unify a message template. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20250207151825.2122419-7-andriy.shevchenko@linux.intel.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
This commit is contained in:
parent
abe3817fa1
commit
9bd2dbe406
|
|
@ -125,10 +125,8 @@ static int gen_74x164_probe(struct spi_device *spi)
|
|||
return ret;
|
||||
|
||||
ret = device_property_read_u32(&spi->dev, "registers-number", &nregs);
|
||||
if (ret) {
|
||||
dev_err(&spi->dev, "Missing 'registers-number' property.\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
if (ret)
|
||||
return dev_err_probe(dev, ret, "Missing 'registers-number' property.\n");
|
||||
|
||||
chip = devm_kzalloc(dev, struct_size(chip, buffer, nregs), GFP_KERNEL);
|
||||
if (!chip)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user