aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/drivers
diff options
context:
space:
mode:
authorPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>2006-10-31 01:07:09 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-31 11:07:00 -0500
commite7f6552f237498c805af9f01aba168b731e0a4ce (patch)
tree609f0e24c234b618bbcde0768a3cfe385ce0d157 /arch/um/drivers
parent2fe30a34a141c2188ff2cdd670d031088d9c5d20 (diff)
[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: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Cc: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/um/drivers')
-rw-r--r--arch/um/drivers/ubd_kern.c31
1 files changed, 20 insertions, 11 deletions
diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c
index 460d669b4774..eed95dc356e0 100644
--- a/arch/um/drivers/ubd_kern.c
+++ b/arch/um/drivers/ubd_kern.c
@@ -706,27 +706,36 @@ out:
706 706
707static int ubd_config(char *str) 707static int ubd_config(char *str)
708{ 708{
709 int n, err; 709 int n, ret;
710 710
711 str = kstrdup(str, GFP_KERNEL); 711 str = kstrdup(str, GFP_KERNEL);
712 if(str == NULL){ 712 if (str == NULL) {
713 printk(KERN_ERR "ubd_config failed to strdup string\n"); 713 printk(KERN_ERR "ubd_config failed to strdup string\n");
714 return(1); 714 ret = 1;
715 goto out;
715 } 716 }
716 err = ubd_setup_common(str, &n); 717 ret = ubd_setup_common(str, &n);
717 if(err){ 718 if (ret) {
718 kfree(str); 719 ret = -1;
719 return(-1); 720 goto err_free;
721 }
722 if (n == -1) {
723 ret = 0;
724 goto out;
720 } 725 }
721 if(n == -1) return(0);
722 726
723 mutex_lock(&ubd_lock); 727 mutex_lock(&ubd_lock);
724 err = ubd_add(n); 728 ret = ubd_add(n);
725 if(err) 729 if (ret)
726 ubd_devs[n].file = NULL; 730 ubd_devs[n].file = NULL;
727 mutex_unlock(&ubd_lock); 731 mutex_unlock(&ubd_lock);
728 732
729 return(err); 733out:
734 return ret;
735
736err_free:
737 kfree(str);
738 goto out;
730} 739}
731 740
732static int ubd_get_config(char *name, char *str, int size, char **error_out) 741static int ubd_get_config(char *name, char *str, int size, char **error_out)