Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

component: remove impossible condition

We will be evaluating this condition only if match->num == match->alloc
and that means we have already dereferenced match which implies match
can not be NULL at this point.
Moreover we have done a NULL check on match just before this.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Sudip Mukherjee and committed by
Greg Kroah-Hartman
4877bb91 9e5b3d6f

+1 -1
+1 -1
drivers/base/component.c
··· 265 265 } 266 266 267 267 if (match->num == match->alloc) { 268 - size_t new_size = match ? match->alloc + 16 : 15; 268 + size_t new_size = match->alloc + 16; 269 269 int ret; 270 270 271 271 ret = component_match_realloc(master, match, new_size);