am 47c0fcd0
: Merge "initialization of defined variables"
* commit '47c0fcd0841764a50d05e1fa4831f3002258ae22': initialization of defined variables
This commit is contained in:
commit
c18a034e16
1 changed files with 9 additions and 8 deletions
17
hardware.c
17
hardware.c
|
@ -67,9 +67,9 @@ static int load(const char *id,
|
|||
const char *path,
|
||||
const struct hw_module_t **pHmi)
|
||||
{
|
||||
int status;
|
||||
void *handle;
|
||||
struct hw_module_t *hmi;
|
||||
int status = -EINVAL;
|
||||
void *handle = NULL;
|
||||
struct hw_module_t *hmi = NULL;
|
||||
|
||||
/*
|
||||
* load the symbols resolving undefined symbols before
|
||||
|
@ -145,11 +145,12 @@ static int hw_module_exists(char *path, size_t path_len, const char *name,
|
|||
int hw_get_module_by_class(const char *class_id, const char *inst,
|
||||
const struct hw_module_t **module)
|
||||
{
|
||||
int i;
|
||||
char prop[PATH_MAX];
|
||||
char path[PATH_MAX];
|
||||
char name[PATH_MAX];
|
||||
char prop_name[PATH_MAX];
|
||||
int i = 0;
|
||||
char prop[PATH_MAX] = {0};
|
||||
char path[PATH_MAX] = {0};
|
||||
char name[PATH_MAX] = {0};
|
||||
char prop_name[PATH_MAX] = {0};
|
||||
|
||||
|
||||
if (inst)
|
||||
snprintf(name, PATH_MAX, "%s.%s", class_id, inst);
|
||||
|
|
Loading…
Reference in a new issue