[U-Boot] [PATCH 1/2] warp7: usb: Introduce a get method for serial number
Fabio Estevam
festevam at gmail.com
Tue Mar 13 13:25:20 UTC 2018
Hi Bryan,
On Tue, Mar 13, 2018 at 9:00 AM, Bryan O'Donoghue
<bryan.odonoghue at linaro.org> wrote:
> +static int warp7_get_serialid(u64 *id)
Maybe you could turn place this function in a common location as it
may be useful for others.
> +{
> + u32 val;
> + int ret;
> +
> + if (!id)
> + return -EINVAL;
> +
> + /* Read first word */
> + ret = fuse_read(WARP7_USB_SERIALID_BANK, WARP7_USB_SERIALID_MSWORD, &val);
> + if (ret)
> + goto done;
Better just do 'return ret' instead of jumping to the 'done' label.
More information about the U-Boot
mailing list