diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2016-09-12 20:10:39 +0200 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2016-09-20 14:26:04 +0200 |
commit | f296190e41ee1e1e6912f0ddae09b28e9cfae48d (patch) | |
tree | 581f8993cd2c41f96cac539cdb9e590c4022bd89 /arch/s390/kernel/crash_dump.c | |
parent | s390: claim efficient unaligned access (diff) | |
download | linux-f296190e41ee1e1e6912f0ddae09b28e9cfae48d.tar.xz linux-f296190e41ee1e1e6912f0ddae09b28e9cfae48d.zip |
s390/crashdump: use list_first_entry_or_null
The combo of list_empty() check and return list_first_entry()
can be replaced with list_first_entry_or_null().
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/crash_dump.c')
-rw-r--r-- | arch/s390/kernel/crash_dump.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/s390/kernel/crash_dump.c b/arch/s390/kernel/crash_dump.c index 29df8484282b..f9293bfefb7f 100644 --- a/arch/s390/kernel/crash_dump.c +++ b/arch/s390/kernel/crash_dump.c @@ -71,9 +71,7 @@ struct save_area * __init save_area_alloc(bool is_boot_cpu) */ struct save_area * __init save_area_boot_cpu(void) { - if (list_empty(&dump_save_areas)) - return NULL; - return list_first_entry(&dump_save_areas, struct save_area, list); + return list_first_entry_or_null(&dump_save_areas, struct save_area, list); } /* |