示例#1
0
static int rmi_f21_init(struct rmi_function_container *fc)
{
	int retval = 0;

	dev_info(&fc->dev, "Intializing F21.");

	retval = rmi_f21_alloc_memory(fc);
	if (retval < 0)
		goto error_exit;

	retval = rmi_f21_initialize(fc);
	if (retval < 0)
		goto error_exit;

	retval = rmi_f21_create_sysfs(fc);
	if (retval < 0)
		goto error_exit;

	return retval;

error_exit:
	rmi_f21_free_memory(fc);

	return retval;
}
示例#2
0
static int rmi_f21_probe(struct rmi_function_dev *fn_dev)
{
	int retval = 0;

	retval = rmi_f21_alloc_memory(fn_dev);
	if (retval < 0)
		goto error_exit;

	retval = rmi_f21_initialize(fn_dev);
	if (retval < 0)
		goto error_exit;

	retval = rmi_f21_create_sysfs(fn_dev);
	if (retval < 0)
		goto error_exit;

	return retval;

error_exit:
	rmi_f21_free_memory(fn_dev);

	return retval;
}