Re: [PATCH 1/2] drm/sitronix/st7571-spi: Add support for ST75156 controller

From: Krzysztof Kozlowski

Date: Mon Oct 26 2026 - 03:28:27 EST


On 26/10/2026 08:23, Krzysztof Kozlowski wrote:
> On Thu, Oct 22, 2026 at 05:31:05PM +0200, Lars Rask wrote:
>> +
>> static int st7571_spi_probe(struct spi_device *spi)
>> {
>> struct st7571_device *st7571;
>> struct regmap *regmap;
>> + struct spi_device_data *spi_data;
>> +
>> + spi_data = devm_kzalloc(&spi->dev, sizeof(*spi_data), GFP_KERNEL);
>> + if (IS_ERR(spi_data))
>> + return dev_err_probe(&spi->dev, PTR_ERR(regmap),
>> + "Failed to initialize spi data\n");
>
> I do not see how you initialize spi data here, so this is just incorrect
> error message. Regardless, driver NEVER prints error messages for
> allocation.
>

... and you have there obvious build warning. Don't copy-paste code.

Best regards,
Krzysztof