diff options
Diffstat (limited to 'common/state/state_variables.c')
-rw-r--r-- | common/state/state_variables.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/common/state/state_variables.c b/common/state/state_variables.c index 66c66f38bd..77946206cd 100644 --- a/common/state/state_variables.c +++ b/common/state/state_variables.c @@ -21,7 +21,7 @@ #include <linux/types.h> #include <malloc.h> #include <net.h> -#include <printk.h> +#include <linux/printk.h> #include <of.h> #include <stdio.h> @@ -180,6 +180,8 @@ static int state_enum32_export(struct state_variable *var, str += sprintf(str, "%s", enum32->names[i]) + 1; ret = of_set_property(node, "names", prop, len, 1); + if (ret) + return ret; free(prop); @@ -261,7 +263,8 @@ static struct state_variable *state_enum32_create(struct state *state, } return &enum32->var; - out: for (i--; i >= 0; i--) +out: + for (i--; i >= 0; i--) free((char *)enum32->names[i]); free(enum32->names); free(enum32); @@ -327,7 +330,8 @@ static struct state_variable *state_mac_create(struct state *state, } return &mac->var; - out: free(mac); +out: + free(mac); return ERR_PTR(ret); } @@ -442,7 +446,8 @@ static struct state_variable *state_string_create(struct state *state, } return &string->var; - out: free(string); +out: + free(string); return ERR_PTR(ret); } |