aboutsummaryrefslogtreecommitdiff
path: root/drivers/fpga/fpga-mgr.c
diff options
context:
space:
mode:
authorViresh Kumar <[email protected]>2016-02-15 21:56:42 +0530
committerRafael J. Wysocki <[email protected]>2016-02-16 13:12:41 +0100
commit0c717d0f9cb46259dce5272705adce64a2d646d9 (patch)
treee2b8424dd7931c98f730720e7062251bdf6b84fd /drivers/fpga/fpga-mgr.c
parentc88c395f4a6485f23f81e385c79945d68bcd5c5d (diff)
PM / OPP: Initialize regulator pointer to an error value
We are currently required to do two checks for regulator pointer: IS_ERR() and IS_NULL(). And multiple instances are reported, about both of these not being used consistently and so resulting in crashes. Fix that by initializing regulator pointer with an error value and checking it only against an error. This makes code more consistent and more efficient. Fixes: 7d34d56ef334 (PM / OPP: Disable OPPs that aren't supported by the regulator) Reported-and-tested-by: Jon Hunter <[email protected]> Reported-and-tested-by: Tony Lindgren <[email protected]> Reported-and-tested-by: Guenter Roeck <[email protected]> Signed-off-by: Viresh Kumar <[email protected]> [ rjw: Initialize to -ENXIO ] Signed-off-by: Rafael J. Wysocki <[email protected]>
Diffstat (limited to 'drivers/fpga/fpga-mgr.c')
0 files changed, 0 insertions, 0 deletions