summaryrefslogtreecommitdiffstats
path: root/drivers/base/component.c
diff options
context:
space:
mode:
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>2016-02-02 12:57:53 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-02-09 17:39:33 -0800
commit4877bb91786e41426bcbec0e151c048a9bd8a1ce (patch)
tree7fae3b42605ca2fe0325601e4f1e32328a6d30fc /drivers/base/component.c
parent9e5b3d6f7f946a3fb4d83ac2ab6d2bfefcdafffb (diff)
downloadop-kernel-dev-4877bb91786e41426bcbec0e151c048a9bd8a1ce.zip
op-kernel-dev-4877bb91786e41426bcbec0e151c048a9bd8a1ce.tar.gz
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>
Diffstat (limited to 'drivers/base/component.c')
-rw-r--r--drivers/base/component.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/component.c b/drivers/base/component.c
index 89f5cf68..2085b23 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);
OpenPOWER on IntegriCloud