From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Sun, 6 Dec 2015 17:07:38 -0500 Subject: [U-Boot] drivers: remoteproc: rproc-uclass: Fix check for NULL pointers In-Reply-To: <1448942758-20424-1-git-send-email-nm@ti.com> References: <1448942758-20424-1-git-send-email-nm@ti.com> Message-ID: <20151206220738.GU9551@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, Nov 30, 2015 at 10:05:58PM -0600, Nishanth Menon wrote: > Neither uc_pdata->name nor check_name are supposed to be NULL in > _rproc_name_is_unique(). if uc_pdata->name is NULL, we are not > intialized yet, however if check_data is NULL, we do not have > proper data. Further, if either were NULL, strlen will crap out > while attempting to derefence NULL. > > Instead, just check if either of these are NULL and bail out. > > This should also fix the following coverity scan warnings: > *** CID 132281: Null pointer dereferences (FORWARD_NULL) > /drivers/remoteproc/rproc-uclass.c: 73 in _rproc_name_is_unique() > > Reported-by: Tom Rini > Signed-off-by: Nishanth Menon Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: