staging: vchiq_core: break early in vchiq_close_service_internal
authorStefan Wahren <stefan.wahren@i2se.com>
Sun, 25 Apr 2021 10:50:54 +0000 (12:50 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 10 May 2021 09:19:27 +0000 (11:19 +0200)
commitbd18b980a21d9654143e7b5167ab82e82c706798
treede19751a6dbf28b24bc1b468db9d61e3ae448c50
parentbdf2b26de6124a175d03092e89610f15ebc6a733
staging: vchiq_core: break early in vchiq_close_service_internal

The logic in VCHIQ_SRVSTATE_OPEN* is unnecessary complex. Handle the error
case of queue_message() first makes it easier to read.

Btw we get the rid of the checkpatch warning:
WARNING: else is not generally useful after a break or return

Reviewed-by: Nicolas Saenz Julienne <nsaenz@kernel.org>
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Link: https://lore.kernel.org/r/1619347863-16080-3-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c