Skip to content

Commit

Permalink
Merge branch 'bits/002-backports' into asahi-wip
Browse files Browse the repository at this point in the history
  • Loading branch information
jannau committed Sep 18, 2024
2 parents 9ea4c38 + bcc9ecf commit 4fccab3
Show file tree
Hide file tree
Showing 4 changed files with 1,312 additions and 1,622 deletions.
6 changes: 1 addition & 5 deletions drivers/power/supply/power_supply_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1232,11 +1232,7 @@ EXPORT_SYMBOL_GPL(power_supply_set_property);
int power_supply_property_is_writeable(struct power_supply *psy,
enum power_supply_property psp)
{
if (atomic_read(&psy->use_cnt) <= 0 ||
!psy->desc->property_is_writeable)
return -ENODEV;

return psy->desc->property_is_writeable(psy, psp);
return psy->desc->property_is_writeable && psy->desc->property_is_writeable(psy, psp);
}
EXPORT_SYMBOL_GPL(power_supply_property_is_writeable);

Expand Down
Loading

0 comments on commit 4fccab3

Please sign in to comment.