crypto: qat - do not shadow error code

Do not shadow the return code from adf_dev_down() in the error path of
the DEV_DOWN command.

Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Reviewed-by: Adam Guerin <adam.guerin@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
Giovanni Cabiddu 2023-09-14 10:55:46 +01:00 committed by Herbert Xu
parent c9ca9756f3
commit c362a58e8d

View file

@ -60,8 +60,8 @@ static ssize_t state_store(struct device *dev, struct device_attribute *attr,
}
ret = adf_dev_down(accel_dev, true);
if (ret < 0)
return -EINVAL;
if (ret)
return ret;
break;
case DEV_UP: