mirror of
https://github.com/armbian/linux.git
synced 2026-01-06 10:13:00 -08:00
Since fwnode may hold ERR_PTR(-ENODEV) or it may be NULL, the fwnode type checks is_of_node(), is_acpi_node() and is is_pset_node() need to consider it. Using IS_ERR_OR_NULL() to check it. Fixes: 0d67e0fa1664 (device property: fix for a case of use-after-free) Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> [ rjw: Subject & changelog ] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> (cherry picked from commit 0224a4a30b57385a60065aa598181868881d8fc6) from v4.7-rc1 BUG=b:62359918 TEST=No regression in camera functionality TEST=Kernel builds and boots Change-Id: I7784c41117c3fe0b4661bb08f0ef7b734a6c6780 Signed-off-by: Nathan Ciobanu <nathan.d.ciobanu@intel.com> Reviewed-on: https://chromium-review.googlesource.com/528596 Commit-Ready: Nathan D Ciobanu <nathan.d.ciobanu@intel.com> Tested-by: Yong Zhi <yong.zhi@intel.com> Reviewed-by: Tomasz Figa <tfiga@chromium.org> Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>