Re: [PATCH] ASoC: rt5663: Fix error handling of device_property_read_u32_array
From: Mark Brown
Date: Mon Jan 07 2019 - 11:05:25 EST
On Sat, Jan 05, 2019 at 07:44:27AM -0600, Aditya Pakki wrote:
> rt5663->imp_table = devm_kzalloc(dev, table_size, GFP_KERNEL);
> - device_property_read_u32_array(dev,
> + return device_property_read_u32_array(dev,
> (u32 *)rt5663->imp_table, table_size);
This is going to silently fail without giving any indication of what's
wrong which isn't great - it's not clear that completely failing to load
the driver is the best option here, and even if it is we should probably
tell the user what went wrong.
We're also not checking the result of the memory allocation...
Description: PGP signature