firmware: arm_scmi: replace of_match_device->data with of_device_get_match_data()
of_match_device can return NULL if no matching device is found though it's highly unlikely to happen in scmi_probe as it's called only if a valid match is found. However we can use of_device_get_match_data() instead of of_match_device()->data to handle NULL pointer checks and return -EINVAL in such a scenario. Reviewed-by: NSteven Price <steven.price@arm.com> Signed-off-by: NAditya Pakki <pakki001@umn.edu> Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
Showing
想要评论请 注册 或 登录