Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e7f6552f authored by Paolo 'Blaisorblade' Giarrusso's avatar Paolo 'Blaisorblade' Giarrusso Committed by Linus Torvalds
Browse files

[PATCH] uml ubd driver: reformat ubd_config



Pure whitespace and style fixes split out from subsequent patch.  Some changes
(err -> ret) don't make sense now, only later, but I split them out anyway
since they cluttered the patch.

Signed-off-by: default avatarPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 2fe30a34
Loading
Loading
Loading
Loading
+20 −11
Original line number Diff line number Diff line
@@ -706,27 +706,36 @@ static int ubd_add(int n)

static int ubd_config(char *str)
{
	int n, err;
	int n, ret;

	str = kstrdup(str, GFP_KERNEL);
	if (str == NULL) {
		printk(KERN_ERR "ubd_config failed to strdup string\n");
		return(1);
		ret = 1;
		goto out;
	}
	err = ubd_setup_common(str, &n);
	if(err){
		kfree(str);
		return(-1);
	ret = ubd_setup_common(str, &n);
	if (ret) {
		ret = -1;
		goto err_free;
	}
	if (n == -1) {
		ret = 0;
		goto out;
	}
	if(n == -1) return(0);

 	mutex_lock(&ubd_lock);
	err = ubd_add(n);
	if(err)
	ret = ubd_add(n);
	if (ret)
		ubd_devs[n].file = NULL;
 	mutex_unlock(&ubd_lock);

	return(err);
out:
 	return ret;

err_free:
	kfree(str);
	goto out;
}

static int ubd_get_config(char *name, char *str, int size, char **error_out)