Messages in this thread Patch in this message | | | Date | Fri, 21 Aug 2020 18:28:10 +0300 | From | Tomer Samara <> | Subject | [PATCH v4 2/2] staging: android: Remove BUG from ion_system_heap.c |
| |
Remove BUG() from ion_sytem_heap.c
this fix the following checkpatch issue: Avoid crashing the kernel - try using WARN_ON & recovery code ratherthan BUG() or BUG_ON().
Signed-off-by: Tomer Samara <tomersamara98@gmail.com> --- drivers/staging/android/ion/ion_system_heap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/android/ion/ion_system_heap.c b/drivers/staging/android/ion/ion_system_heap.c index eac0632ab4e8..00d6154aec34 100644 --- a/drivers/staging/android/ion/ion_system_heap.c +++ b/drivers/staging/android/ion/ion_system_heap.c @@ -30,7 +30,7 @@ static int order_to_index(unsigned int order) for (i = 0; i < NUM_ORDERS; i++) if (order == orders[i]) return i; - BUG(); + /* This is impossible. */ return -1; } -- 2.25.1
| |