diff options
| author | Mathieu Desnoyers <[email protected]> | 2011-11-30 13:34:14 -0500 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2011-12-01 09:37:47 -0800 |
| commit | 2f8e0b31ad257bca9ff5dda9fdfdcc98d38d97f8 (patch) | |
| tree | 2f32febd39efc22ecf864c3f8539dadbb2bcaad0 /tools/perf/scripts | |
| parent | 976d534118219b04277fb6cfcdb71607b730746d (diff) | |
lttng lib: ring buffer: remove stale null-pointer
* Dan Carpenter <[email protected]> wrote:
[...]
> 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 /*
Reported-by: Dan Carpenter <[email protected]>
Signed-off-by: Mathieu Desnoyers <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/scripts')
0 files changed, 0 insertions, 0 deletions