Skip to content

Commit 4877bb9

Browse files
sudipm-mukherjeegregkh
authored andcommitted
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>
1 parent 9e5b3d6 commit 4877bb9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/base/component.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ void component_match_add_release(struct device *master,
265265
}
266266

267267
if (match->num == match->alloc) {
268-
size_t new_size = match ? match->alloc + 16 : 15;
268+
size_t new_size = match->alloc + 16;
269269
int ret;
270270

271271
ret = component_match_realloc(master, match, new_size);

0 commit comments

Comments
 (0)