diff options
author | Brian Norris <briannorris@chromium.org> | 2017-03-09 18:46:13 -0800 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2017-03-23 17:09:12 -0500 |
commit | 5fcaa0051dfcc5fe77aee95061945d80e465a027 (patch) | |
tree | 65c288fe27a7666e79d1ace4885df6546b1471cb /net/lapb | |
parent | c1ae3cfa0e89fa1a7ecc4c99031f5e9ae99d9201 (diff) |
PCI: rockchip: Handle regulator_get_current_limit() failure correctly
regulator_get_current_limit() can return negative error codes. We saved
the return value in an unsigned "curr", and a subsequent check interpreted
a negative error code as a positive (invalid) current limit.
Save the return code as a signed value, which avoids messages like this,
seen on Samsung Chromebook Plus:
rockchip-pcie f8000000.pcie: invalid power supply
[bhelgaas: changelog]
Fixes: 4816c4c7b82b ("PCI: rockchip: Provide captured slot power limit and scale")
Signed-off-by: Brian Norris <briannorris@chromium.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Shawn Lin <shawn.lin@rock-chips.com>
Diffstat (limited to 'net/lapb')
0 files changed, 0 insertions, 0 deletions