pm_runtime_get_sync will return negative values for error
and 0 or 1 for success. Update the error check accordingly.
Signed-off-by: Shreyas NC <shreyas.nc@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Fixes: 9d715fa005eb: ("soundwire: Add IO transfer")
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
return ret;
ret = pm_runtime_get_sync(slave->bus->dev);
- if (!ret)
+ if (ret < 0)
return ret;
ret = sdw_transfer(slave->bus, &msg);
return ret;
ret = pm_runtime_get_sync(slave->bus->dev);
- if (!ret)
+ if (ret < 0)
return ret;
ret = sdw_transfer(slave->bus, &msg);