Skip to content
Commit 36cc14ac authored by Rolf Evers-Fischer's avatar Rolf Evers-Fischer Committed by Lorenzo Pieralisi
Browse files

PCI: endpoint: Simplify name allocation for EPF device



This commit replaces allocating and freeing the intermediate
'buf'/'func_name' with a combination of 'kstrndup()' and 'len'.

'len' is the required length of 'epf->name'.
'epf->name' should be either the first part of 'name' preceding the '.'
or the complete 'name', if there is no '.' in the name.

Signed-off-by: default avatarRolf Evers-Fischer <rolf.evers.fischer@aptiv.com>
Signed-off-by: default avatarLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Acked-by: default avatarKishon Vijay Abraham I <kishon@ti.com>
Reviewed-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
parent 7928b2cb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment