Skip to content
Commit c7482b81 authored by Li Zefan's avatar Li Zefan Committed by Roland Dreier
Browse files

IB: Fix return value in ib_device_register_sysfs()



If kobject_create_and_add() fails and returns NULL, the current code
in ib_device_register_sysfs() does not set ret and hence returns 0.
Set ret to -ENOMEM for this failure, so that the caller knows that
ib_device_register_sysfs() actually failed.

Signed-off-by: default avatarLi Zefan <lizf@cn.fujitsu.com>
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent 101142c3
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment