From: Gaston Gonzalez Date: Wed, 15 Sep 2021 20:29:15 +0000 (-0300) Subject: staging: vchiq: add braces to if block X-Git-Tag: v6.6.17~8914^2~386 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=341975886aed47b1d34d04676c82f52614a7ba3c;p=platform%2Fkernel%2Flinux-rpi.git staging: vchiq: add braces to if block The rule of not using braces in single statement does not apply if only one branch of the conditional statement is a single statement. Add braces to fix this. While at it, remove extra blank space after a comment inside the if block. Reported by checkpatch.pl Signed-off-by: Gaston Gonzalez Link: https://lore.kernel.org/r/20210915202916.413914-2-gascoar@gmail.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_connected.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_connected.c index f367dbe..1802fd5 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_connected.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_connected.c @@ -34,16 +34,15 @@ void vchiq_add_connected_callback(void (*callback)(void)) if (mutex_lock_killable(&g_connected_mutex)) return; - if (g_connected) + if (g_connected) { /* We're already connected. Call the callback immediately. */ - callback(); - else { - if (g_num_deferred_callbacks >= MAX_CALLBACKS) + } else { + if (g_num_deferred_callbacks >= MAX_CALLBACKS) { vchiq_log_error(vchiq_core_log_level, "There already %d callback registered - please increase MAX_CALLBACKS", g_num_deferred_callbacks); - else { + } else { g_deferred_callback[g_num_deferred_callbacks] = callback; g_num_deferred_callbacks++;