Found by Coverity:
CID
1376174 (#1 of 1): Identical code for different branches
(IDENTICAL_BRANCHES)identical_branches: The same code is executed when
the condition !trimmer is true or false, because the code in the if-then
branch and after the if statement is identical. Should the if statement
be removed?
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
static
struct trimmer *create_trimmer_data(void)
{
- struct trimmer *trimmer;
-
- trimmer = g_new0(struct trimmer, 1);
- if (!trimmer) {
- goto end;
- }
-end:
- return trimmer;
+ return g_new0(struct trimmer, 1);
}
void finalize_trimmer(struct bt_private_component *component)