]> git.baikalelectronics.ru Git - kernel.git/commit
platform/x86: barco-p50-gpio: Add check for platform_driver_register
authorJiasheng Jiang <jiasheng@iscas.ac.cn>
Thu, 26 May 2022 09:03:45 +0000 (17:03 +0800)
committerHans de Goede <hdegoede@redhat.com>
Fri, 10 Jun 2022 19:59:08 +0000 (21:59 +0200)
commitce8938ab90d85f30b3e85d8c52dc1de3e9abda4f
treee2ec0eb7af6f698593a7d2aa679538b02ee9d0b3
parentced1ea95b013d5b3129243e7175f984567f80e9d
platform/x86: barco-p50-gpio: Add check for platform_driver_register

As platform_driver_register() could fail, it should be better
to deal with the return value in order to maintain the code
consisitency.

Fixes: 87634f639720 ("platform/x86: Support for EC-connected GPIOs for identify LED/button on Barco P50 board")
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Acked-by: Peter Korsgaard <peter.korsgaard@barco.com>
Link: https://lore.kernel.org/r/20220526090345.1444172-1-jiasheng@iscas.ac.cn
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/barco-p50-gpio.c