mtd: devices: elm: fix elm_context_save() and elm_context_restore() functions
commit 6938ad40cb upstream.
These two function's switch case lack the 'break' that make them always
return error.
Signed-off-by: Ted Juan <ted.juan@gmail.com>
Acked-by: Pekon Gupta <pekon@ti.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
4476263109
commit
9734f8dba7
@ -445,6 +445,7 @@ static int elm_context_save(struct elm_info *info)
|
||||
ELM_SYNDROME_FRAGMENT_1 + offset);
|
||||
regs->elm_syndrome_fragment_0[i] = elm_read_reg(info,
|
||||
ELM_SYNDROME_FRAGMENT_0 + offset);
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
@ -483,6 +484,7 @@ static int elm_context_restore(struct elm_info *info)
|
||||
regs->elm_syndrome_fragment_1[i]);
|
||||
elm_write_reg(info, ELM_SYNDROME_FRAGMENT_0 + offset,
|
||||
regs->elm_syndrome_fragment_0[i]);
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user