Move is_protected assignment closer to its user.
This increases readability and makes maintenance easier.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
u32 mask;
int ret;
- is_protected = ofnode_read_bool(pin_node, "protected");
-
pad_offset = ofnode_read_s32_default(pin_node, "pad-offset", -1);
if (pad_offset == -1)
return -EINVAL;
if (mode & ~mask)
return -ENOTSUPP;
+ is_protected = ofnode_read_bool(pin_node, "protected");
if (is_protected)
ret = mrfld_pinconfig_protected(pad_offset, mask, mode);
else