The function adf_sysfs_init() is used by qat_4xxx to create sysfs
attributes. This is called by the probe function before starting a
device. With this sequence, there might be a chance that the sysfs
entries for configuration might be changed by a user while the driver
is performing a device bring-up causing unexpected behaviors.
Delay the creation of sysfs entries after adf_dev_start().
Signed-off-by: Shashank Gupta <shashank.gupta@intel.com>
Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
goto out_err_disable_aer;
}
goto out_err_disable_aer;
}
- ret = adf_sysfs_init(accel_dev);
- if (ret)
- goto out_err_disable_aer;
-
ret = hw_data->dev_config(accel_dev);
if (ret)
goto out_err_disable_aer;
ret = hw_data->dev_config(accel_dev);
if (ret)
goto out_err_disable_aer;
if (ret)
goto out_err_dev_stop;
if (ret)
goto out_err_dev_stop;
+ ret = adf_sysfs_init(accel_dev);
+ if (ret)
+ goto out_err_dev_stop;
+
return ret;
out_err_dev_stop:
return ret;
out_err_dev_stop: