mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 04:01:48 -04:00
Merge branch 'device-properties'
* device-properties: device property: check fwnode type in to_of_node() device property: attach 'else if' to the proper 'if' device property: fallback to pset when gettng one string device property: fix potential NULL pointer dereference
This commit is contained in:
commit
498012511a
3 changed files with 10 additions and 6 deletions
|
|
@ -528,13 +528,14 @@ int acpi_dev_prop_read(struct acpi_device *adev, const char *propname,
|
|||
|
||||
if (!val)
|
||||
return obj->package.count;
|
||||
else if (nval <= 0)
|
||||
return -EINVAL;
|
||||
|
||||
if (nval > obj->package.count)
|
||||
return -EOVERFLOW;
|
||||
else if (nval <= 0)
|
||||
return -EINVAL;
|
||||
|
||||
items = obj->package.elements;
|
||||
|
||||
switch (proptype) {
|
||||
case DEV_PROP_U8:
|
||||
ret = acpi_copy_property_array_u8(items, (u8 *)val, nval);
|
||||
|
|
|
|||
Loading…
Reference in a new issue