Fixed, I'll push the patch to GregKH in my next round.

Thanks!

Mathieu

* Dan Carpenter ([email protected]) wrote:
> Hello Mathieu Desnoyers,
> 
> This is a semi-automatic email about new static checker warnings.
> 
> The patch c844b2f5cfea: "lttng lib: ring buffer" from Nov 28, 2011, 
> leads to the following Smatch complaint:
> 
> drivers/staging/lttng/lib/ringbuffer/ring_buffer_frontend.c +1150 
> lib_ring_buffer_print_buffer_errors()
>        warn: variable dereferenced before check 'chan' (see line 1143)
> 
> drivers/staging/lttng/lib/ringbuffer/ring_buffer_frontend.c
>   1142        {
>   1143                const struct lib_ring_buffer_config *config = 
> chan->backend.config;
>                                                               
> ^^^^^^^^^^^^^^^^^^^^
> Dereference.
> 
>   1144                unsigned long write_offset, cons_offset;
>   1145        
>   1146                /*
>   1147                 * Can be called in the error path of allocation when
>   1148                 * trans_channel_data is not yet set.
>   1149                 */
>   1150                if (!chan)
>                 ^^^^^^^^^
> Check.  At first glance the comment seems out of date, I think check can
> be removed safely.
> 
>   1151                        return;
>   1152                /*
> 
> regards,
> dan carpenter
> 

-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com

_______________________________________________
lttng-dev mailing list
[email protected]
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

Reply via email to