@@ -344,7 +344,7 @@ static void buffer_to_host_work_cb(struct work_struct *work)
344
344
345
345
vchiq_release_service (instance -> service_handle );
346
346
347
- if (ret != 0 )
347
+ if (ret )
348
348
pr_err ("%s: ctx: %p, vchiq_bulk_receive failed %d\n" ,
349
349
__func__ , msg_context , ret );
350
350
}
@@ -669,7 +669,7 @@ static void buffer_to_host_cb(struct vchiq_mmal_instance *instance,
669
669
/* data is not in message, queue a bulk receive */
670
670
msg_context -> u .bulk .status =
671
671
bulk_receive (instance , msg , msg_context );
672
- if (msg_context -> u .bulk .status == 0 )
672
+ if (! msg_context -> u .bulk .status )
673
673
return ; /* successful bulk submission, bulk
674
674
* completion will trigger callback
675
675
*/
@@ -862,7 +862,7 @@ static int send_synchronous_mmal_msg(struct vchiq_mmal_instance *instance,
862
862
863
863
timeout = wait_for_completion_timeout (& msg_context -> u .sync .cmplt ,
864
864
SYNC_MSG_TIMEOUT * HZ );
865
- if (timeout == 0 ) {
865
+ if (! timeout ) {
866
866
pr_err ("timed out waiting for sync completion\n" );
867
867
ret = - ETIME ;
868
868
/* todo: what happens if the message arrives after aborting */
@@ -1030,7 +1030,7 @@ static int port_info_get(struct vchiq_mmal_instance *instance,
1030
1030
if (ret != MMAL_MSG_STATUS_SUCCESS )
1031
1031
goto release_msg ;
1032
1032
1033
- if (rmsg -> u .port_info_get_reply .port .is_enabled == 0 )
1033
+ if (! rmsg -> u .port_info_get_reply .port .is_enabled )
1034
1034
port -> enabled = 0 ;
1035
1035
else
1036
1036
port -> enabled = 1 ;
@@ -1507,7 +1507,7 @@ static int port_disable(struct vchiq_mmal_instance *instance,
1507
1507
1508
1508
ret = port_action_port (instance , port ,
1509
1509
MMAL_MSG_PORT_ACTION_TYPE_DISABLE );
1510
- if (ret == 0 ) {
1510
+ if (! ret ) {
1511
1511
port_return_buffers (instance , port , port -> buffer_cb );
1512
1512
1513
1513
ret = port_info_get (instance , port );
@@ -2062,7 +2062,7 @@ int vchiq_mmal_component_enable(struct vchiq_mmal_instance *instance,
2062
2062
}
2063
2063
2064
2064
ret = enable_component (instance , component );
2065
- if (ret == 0 )
2065
+ if (! ret )
2066
2066
component -> enabled = 1 ;
2067
2067
2068
2068
mutex_unlock (& instance -> vchiq_mutex );
@@ -2088,7 +2088,7 @@ int vchiq_mmal_component_disable(struct vchiq_mmal_instance *instance,
2088
2088
}
2089
2089
2090
2090
ret = disable_component (instance , component );
2091
- if (ret == 0 )
2091
+ if (! ret )
2092
2092
component -> enabled = 0 ;
2093
2093
2094
2094
mutex_unlock (& instance -> vchiq_mutex );
@@ -2126,7 +2126,7 @@ int vchiq_mmal_finalise(struct vchiq_mmal_instance *instance)
2126
2126
vchiq_use_service (instance -> service_handle );
2127
2127
2128
2128
status = vchiq_close_service (instance -> service_handle );
2129
- if (status != 0 )
2129
+ if (status )
2130
2130
pr_err ("mmal-vchiq: VCHIQ close failed\n" );
2131
2131
2132
2132
mutex_unlock (& instance -> vchiq_mutex );
0 commit comments