[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190107160459.GI9570@sirena.org.uk>
Date: Mon, 7 Jan 2019 16:04:59 +0000
From: Mark Brown <broonie@...nel.org>
To: Aditya Pakki <pakki001@....edu>
Cc: kjlu@....edu, Bard Liao <bardliao@...ltek.com>,
Oder Chiou <oder_chiou@...ltek.com>,
Liam Girdwood <lgirdwood@...il.com>,
Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>, alsa-devel@...a-project.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ASoC: rt5663: Fix error handling of
device_property_read_u32_array
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,
> "realtek,impedance_sensing_table",
> (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...
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists