]> git.baikalelectronics.ru Git - kernel.git/commit
firmware: arm_sdei: Avoid nested statements in sdei_init()
authorGavin Shan <gshan@redhat.com>
Tue, 22 Sep 2020 13:04:14 +0000 (23:04 +1000)
committerWill Deacon <will@kernel.org>
Mon, 28 Sep 2020 20:52:22 +0000 (21:52 +0100)
commit5f20b80cffebb7e863a772c24dd2251c4d1e47df
treec9a73a075deb4bc8fa559e373cb1ecccde086c81
parent6f8c67ebae22ce31444e309c3a69ebe9e9fa81f5
firmware: arm_sdei: Avoid nested statements in sdei_init()

In sdei_init(), the nested statements can be avoided by bailing
on error from platform_driver_register() or absent ACPI SDEI table.
With it, the code looks a bit more readable.

Signed-off-by: Gavin Shan <gshan@redhat.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: James Morse <james.morse@arm.com>
Link: https://lore.kernel.org/r/20200922130423.10173-5-gshan@redhat.com
Signed-off-by: Will Deacon <will@kernel.org>
drivers/firmware/arm_sdei.c