Skip to content
Commit d8254e0e authored by Dmitry Torokhov's avatar Dmitry Torokhov Committed by Rafael J. Wysocki
Browse files

PNPBIOS: check return value of pnp_add_device()



pnp_add_device() may fail so we need to handle errors and avoid leaking
memory.

Also, when pnp_alloc_dev fails, return -ENOMEM rather than -1.

Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 62c6dae0
Loading
Loading
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