aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_connected.c
diff options
context:
space:
mode:
authorNicolas Saenz Julienne <nsaenzjulienne@suse.de>2019-05-09 16:31:36 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-05-20 07:40:42 +0200
commit023dbe17dd38ae6b9d232e5f6144ce65befbf84d (patch)
tree64073449624654171f10d4839b477dc647a99acc /drivers/staging/vc04_services/interface/vchiq_arm/vchiq_connected.c
parentstaging: vchiq: make wait events interruptible (diff)
downloadlinux-dev-023dbe17dd38ae6b9d232e5f6144ce65befbf84d.tar.xz
linux-dev-023dbe17dd38ae6b9d232e5f6144ce65befbf84d.zip
staging: vchiq: stop explicitly comparing with zero to catch errors
The vchiq code tends to follow a coding pattern that's not accepted as per the Linux kernel coding style We have this: if (expression != 0) We want this: if (expression) We make an exception if the expression refers to a size, in which case it's accepted for the sake of clarity. Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Acked-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vc04_services/interface/vchiq_arm/vchiq_connected.c')
-rw-r--r--drivers/staging/vc04_services/interface/vchiq_arm/vchiq_connected.c4
1 files changed, 2 insertions, 2 deletions
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 e87e6619695e..1640906e3929 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_connected.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_connected.c
@@ -41,7 +41,7 @@ void vchiq_add_connected_callback(VCHIQ_CONNECTED_CALLBACK_T callback)
{
connected_init();
- if (mutex_lock_killable(&g_connected_mutex) != 0)
+ if (mutex_lock_killable(&g_connected_mutex))
return;
if (g_connected)
@@ -76,7 +76,7 @@ void vchiq_call_connected_callbacks(void)
connected_init();
- if (mutex_lock_killable(&g_connected_mutex) != 0)
+ if (mutex_lock_killable(&g_connected_mutex))
return;
for (i = 0; i < g_num_deferred_callbacks; i++)