From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anatolij Gustschin Date: Mon, 6 Aug 2018 15:09:40 +0200 Subject: [U-Boot] [PATCH v4 04/13] regmap: Improve error handling In-Reply-To: <20180803080118.27748-4-mario.six@gdsys.cc> References: <20180803080118.27748-1-mario.six@gdsys.cc> <20180803080118.27748-4-mario.six@gdsys.cc> Message-ID: <20180806150940.70f80054@crub> 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, 3 Aug 2018 10:01:09 +0200 Mario Six mario.six at gdsys.cc wrote: > ofnode_read_simple_addr_cells may fail and return a negative error code. > Check for this when initializing regmaps. > > Also check if both_len is zero, since this is perfectly possible, and > would lead to a division-by-zero further down the line. > > Reviewed-by: Anatolij Gustschin > Reviewed-by: Simon Glass > Signed-off-by: Mario Six > > --- > > v3 -> v4: > No changes > > v2 -> v3: > New in v3 > > --- > drivers/core/regmap.c | 17 +++++++++++++++++ > 1 file changed, 17 insertions(+) Applied to u-boot-staging/agust at denx.de, thanks! -- Anatolij