From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Fri, 2 Nov 2018 16:29:49 -0400 Subject: [U-Boot] w1: fix data abort if no one wire bus master present In-Reply-To: <1540225879-17841-2-git-send-email-martin.fuzzey@flowbird.group> References: <1540225879-17841-2-git-send-email-martin.fuzzey@flowbird.group> Message-ID: <20181102202949.GK1032@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 Mon, Oct 22, 2018 at 06:31:08PM +0200, Martin Fuzzey wrote: > When the "w1 bus" command is used with no bus master present > a data abort may occur. > > This is because uclass_first_device() returns zero, but sets the output > struct udevice pointer to NULL in the no device found case. > > Fix w1_get_bus() to account for this and return an error code > as is expected by the callers. > > Signed-off-by: Martin Fuzzey > Reviewed-by: Eugen Hristev 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: