Skip to content
Snippets Groups Projects
Commit 9cb05a8f authored by Nishanth Menon's avatar Nishanth Menon Committed by Tom Rini
Browse files

drivers: remoteproc: rproc-uclass: Fix check for NULL pointers


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: default avatarTom Rini <trini@konsulko.com>
Signed-off-by: default avatarNishanth Menon <nm@ti.com>
parent 5be93569
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment