Hello Gustavo Padovan,

This is a semi-automatic email about new static checker warnings.

The patch b55b54b5db33: "staging/android: remove struct sync_pt" from 
Jan 21, 2016, leads to the following Smatch complaint:

drivers/staging/android/sync_debug.c:108 sync_print_fence()
         warn: variable dereferenced before check 'fence' (see line 91)

drivers/staging/android/sync_debug.c
    90          int status = 1;
    91          struct sync_timeline *parent = fence_parent(fence);
                                               ^^^^^^^^^^^^^^^^^^^
New dereference inside function call (or possibly not, but effectively
yes).

    92  
    93          if (fence_is_signaled_locked(fence))
    94                  status = fence->status;
    95  
    96          seq_printf(s, "  %s%sfence %s",
    97                     show ? parent->name : "",
    98                     show ? "_" : "",
    99                     sync_status_str(status));
   100  
   101          if (status <= 0) {
   102                  struct timespec64 ts64 =
   103                          ktime_to_timespec64(fence->timestamp);
   104  
   105                  seq_printf(s, "@%lld.%09ld", (s64)ts64.tv_sec, 
ts64.tv_nsec);
   106          }
   107  
   108          if ((!fence || fence->ops->timeline_value_str) &&
                     ^^^^^^
Checked to late.

   109                  fence->ops->fence_value_str) {
   110                  char value[64];

regards,
dan carpenter
_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to