Tag: 8bf66b24cfcb71d6f3e33a0ebd119678823d7c70

mtd: Replace if and BUG with BUG_ON

Author: Amitoj Kaur Chawla <amitoj1606@gmail.com> Replace if condition and BUG() with a BUG_ON having the conditional expression of the if statement as argument. The Coccinelle semantic patch used to make this change is as follows: @@ expression E,f; @@ ( if () { BUG(); } | – if (E) { BUG(); } + BUG_ON(E); ) …

Continue reading