Skip to content
Commit f4747b9c authored by Colin Ian King's avatar Colin Ian King Committed by Rafael J. Wysocki
Browse files

drivers: base: swnode: check if swnode is NULL before dereferencing it



The to_software_mode() macro can potentially return NULL, so also add
a NULL check on swnode before dereferencing it to avoid any NULL
pointer dereferences.

Detected by CoverityScan, CID#1476052 ("Explicit null dereferenced")

Fixes: 59abd836 (drivers: base: Introducing software nodes to the firmware node framework)
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 1d8f062e
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