diff options
author | Hans de Goede <hdegoede@redhat.com> | 2017-08-06 18:23:52 +0200 |
---|---|---|
committer | Sebastian Reichel <sebastian.reichel@collabora.co.uk> | 2017-08-09 17:56:46 +0200 |
commit | 46cecd130d553f7340d033a4019839e9c018200d (patch) | |
tree | 47b5d7293d8c857ac56a8131c1d7d53a3c6f73fe /fs/overlayfs/inode.c | |
parent | 16ac345b15529995a6ca0109ad41f96e3db82e56 (diff) | |
download | op-kernel-dev-46cecd130d553f7340d033a4019839e9c018200d.zip op-kernel-dev-46cecd130d553f7340d033a4019839e9c018200d.tar.gz |
power: supply: Fix power_supply_am_i_supplied to return -ENODEV when apropriate
Commit 2848e039c562 ("power: supply: Make power_supply_am_i_supplied return
-ENODEV if there are no suppliers") was supposed to make
power_supply_am_i_supplied() return -ENODEV when there are no supplies
which supply the supply passed to it.
But instead it will only return -ENODEV when there are no supplies at
all as data->count++; is incremented on every call of the iterator, rather
then only when __power_supply_is_supplied_by returns true. This commit
fixes this.
Fixes: 2848e039c562 ("power: supply: Make power_supply_am_i_supplied ...")
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Diffstat (limited to 'fs/overlayfs/inode.c')
0 files changed, 0 insertions, 0 deletions