History

Merge branches 'acpica-fixes' and 'device-properties-fixes'

* acpica-fixes: ACPICA: Dispatcher: Update thread ID for recursive method calls * device-properties-fixes: device property: Avoid potential dereferences of invalid pointers

Rafael J. Wysocki committed 10 years ago

Commit 7c21b382 parents 93d6884 0224a4a3 files · +4 −4Browse files

Unified · Split

3 files
  1. drivers/base/property.c +1 −1
  2. include/acpi/acpi_bus.h +2 −2
  3. include/linux/of.h +1 −1
drivers/base/property.c+1−1
@@ -21,7 +21,7 @@ · 20 unmodified lines
2121
2222 static inline bool is_pset_node(struct fwnode_handle *fwnode)
2323 {
24− return fwnode && fwnode->type == FWNODE_PDATA;
24+ return !IS_ERR_OR_NULL(fwnode) && fwnode->type == FWNODE_PDATA;
2525 }
2626
2727 static inline struct property_set *to_pset_node(struct fwnode_handle *fwnode)
include/acpi/acpi_bus.h+2−2
@@ -394,13 +394,13 @@ struct acpi_data_node { · 393 unmodified lines
394394
395395 static inline bool is_acpi_node(struct fwnode_handle *fwnode)
396396 {
397− return fwnode && (fwnode->type == FWNODE_ACPI
397+ return !IS_ERR_OR_NULL(fwnode) && (fwnode->type == FWNODE_ACPI
398398 || fwnode->type == FWNODE_ACPI_DATA);
399399 }
400400
401401 static inline bool is_acpi_device_node(struct fwnode_handle *fwnode)
402402 {
403− return fwnode && fwnode->type == FWNODE_ACPI;
403+ return !IS_ERR_OR_NULL(fwnode) && fwnode->type == FWNODE_ACPI;
404404 }
405405
406406 static inline struct acpi_device *to_acpi_device_node(struct fwnode_handle *fwnode)
include/linux/of.h+1−1
@@ -133,7 +133,7 @@ void of_core_init(void); · 132 unmodified lines
133133
134134 static inline bool is_of_node(struct fwnode_handle *fwnode)
135135 {
136− return fwnode && fwnode->type == FWNODE_OF;
136+ return !IS_ERR_OR_NULL(fwnode) && fwnode->type == FWNODE_OF;
137137 }
138138
139139 static inline struct device_node *to_of_node(struct fwnode_handle *fwnode)