From 4877bb91786e41426bcbec0e151c048a9bd8a1ce Mon Sep 17 00:00:00 2001 From: Sudip Mukherjee Date: Tue, 2 Feb 2016 12:57:53 +0530 Subject: 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 Signed-off-by: Greg Kroah-Hartman --- drivers/base/component.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/base/component.c') diff --git a/drivers/base/component.c b/drivers/base/component.c index 89f5cf68d80a..2085b234f7c8 100644 --- a/drivers/base/component.c +++ b/drivers/base/component.c @@ -265,7 +265,7 @@ void component_match_add_release(struct device *master, } if (match->num == match->alloc) { - size_t new_size = match ? match->alloc + 16 : 15; + size_t new_size = match->alloc + 16; int ret; ret = component_match_realloc(master, match, new_size); -- cgit