From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Thu, 21 Apr 2016 07:27:19 -0400 Subject: [U-Boot] [PATCH] cmd/usb_mass_storage.c: Rework ums_init() ret logic slightly In-Reply-To: <1461164516-28568-1-git-send-email-trini@konsulko.com> References: <57174FB3.5070501@denx.de> <1461164516-28568-1-git-send-email-trini@konsulko.com> Message-ID: <20160421112719.GH3732@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 Wed, Apr 20, 2016 at 11:01:56AM -0400, Tom Rini wrote: > Previously, ret could be used uninitialized if > blk_get_device_part_str() failed. Default to ret being set to -1 so > that we always return an err up if we have a problem and then invert the > logic on testing ums_count as when that is non-zero is the time we can > return 0. > > Cc: John Tobias > Acked-by: Marek Vasut > Signed-off-by: Tom Rini With the brace changes Marek suggested, 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: Digital signature URL: