Skip to content
Snippets Groups Projects
Commit 0db912de authored by Ovidiu Panait's avatar Ovidiu Panait Committed by Matthias Brugger
Browse files

pinctrl: bcm283x: Store the return value of dev_read_u32_default to int


Currently, the return value of dev_read_u32_default is stored in an u32,
causing the subsequent "if (function < 0)" to always be false:

u32 function;
...
function = dev_read_u32_default(config, "brcm,function", -1);
if (function < 0) {
        debug("Failed reading function for pinconfig %s (%d)\n",
                      config->name, function);
        return -EINVAL;
}

Make "function" variable an int to fix this.

Cc: Matthias Brugger <mbrugger@suse.com>
Signed-off-by: default avatarOvidiu Panait <ovidiu.panait@windriver.com>
Signed-off-by: Matthias Brugger's avatarMatthias Brugger <mbrugger@suse.com>
parent e020c07a
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment