From: Tom Rini Date: Sun, 10 Feb 2019 08:10:26 -0500 Subject: [U-Boot] [U-Boot, v3, 1/2] dm: device: fail uclass_find_first_device() if list_empty In-Reply-To: <20190201150109.4450-2-marcel@ziswiler.com> References: <20190201150109.4450-2-marcel@ziswiler.com> Message-ID: <20190210131026.GO16814@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Fri, Feb 01, 2019 at 04:01:07PM +0100, Marcel Ziswiler wrote: > From: Marcel Ziswiler > > While uclass_find_device() fails with -ENODEV in case of list_empty > strangely uclass_find_first_device() returns 0. > > Fix uclass_find_first_device() to also fail with -ENODEV instead. > > Signed-off-by: Marcel Ziswiler > Reviewed-by: Simon Glass Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: