rdma: fix crash when failing to read pci addr on create
Type: fix Change-Id: I543e2e5976cb384b81278a7ec98a0a6ab1612438 Signed-off-by: Benoît Ganne <bganne@cisco.com> (cherry picked from commit 0dd97d473bc0c958d9fcea508e1f5122a137b23f)
This commit is contained in:
parent
8413f48d6e
commit
8a7109cc6e
@ -566,6 +566,9 @@ sysfs_path_to_pci_addr (char *path, vlib_pci_addr_t * addr)
|
||||
u8 *s;
|
||||
|
||||
s = clib_sysfs_link_to_name (path);
|
||||
if (!s)
|
||||
return 0;
|
||||
|
||||
unformat_init_string (&in, (char *) s, strlen ((char *) s));
|
||||
rv = unformat (&in, "%U", unformat_vlib_pci_addr, addr);
|
||||
unformat_free (&in);
|
||||
|
Loading…
x
Reference in New Issue
Block a user