On 25/11/2024 14:35, Robert Budai wrote: ... > + indio_dev->name = spi_get_device_id(spi)->name; > + indio_dev->channels = st->info->channels; > + indio_dev->num_channels = st->info->num_channels; > + indio_dev->available_scan_masks = adis16550_channel_masks; > + indio_dev->info = &adis16550_info; > + indio_dev->modes = INDIO_DIRECT_MODE; > + > + st->adis.ops = &adis16550_ops; > + > + st->adis.xfer = kcalloc(2, sizeof(*st->adis.xfer), GFP_KERNEL); > + if (!st->adis.xfer) > + return -ENOMEM; > + > + void *buffer_tmp __free(void) = kzalloc(ADIS16550_BURST_DATA_LEN + sizeof(u32), > + GFP_KERNEL); > + if (!buffer_tmp) { > + kfree(st->adis.xfer); > + return -ENOMEM; > + } > + st->adis.buffer = no_free_ptr(buffer_tmp); > + > + ret = devm_regulator_get_enable(dev, "vdd"); > + if (ret) > + return dev_err_probe(dev, ret, > + "Failed to get vdd regulator\n"); > + > + ret = adis_init(&st->adis, indio_dev, spi, &adis16550_data); > + if (ret) > + return ret; Why this error path does not free xfer but earlier does? > + > + ret = __adis_initial_startup(&st->adis); > + if (ret) > + return ret; > + > + ret = adis16550_config_sync(st); > + if (ret) > + return ret; > + > + ret = devm_adis_setup_buffer_and_trigger(&st->adis, indio_dev, > + adis16550_trigger_handler); > + if (ret) > + return ret; > + > + ret = devm_iio_device_register(dev, indio_dev); > + if (ret) > + return ret; > + > + adis16550_debugfs_init(indio_dev); > + > + return 0; > +} > + > +static const struct spi_device_id adis16550_id[] = { > + { "adis16550", ADIS16550 }, > + { "adis16550w", ADIS16550W }, > + { } > +}; > +MODULE_DEVICE_TABLE(spi, adis16550_id); > + > +static const struct of_device_id adis16550_of_match[] = { > + { .compatible = "adi,adis16550" }, > + { .compatible = "adi,adis16550w" }, So devices are the same or do you have here un-synced tables? Best regards, Krzysztof