public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* re: component: add support for component match array
@ 2014-07-07 14:25 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2014-07-07 14:25 UTC (permalink / raw)
  To: kernel-janitors

Hello Russell King,

This is a semi-automatic email about new static checker warnings.

The patch 6955b58254c2: "component: add support for component match 
array" from Apr 19, 2014, leads to the following Smatch complaint:

drivers/base/component.c:297 component_master_add_with_match()
	 error: we previously assumed 'match' could be null (see line 293)

drivers/base/component.c
   292	
   293		if (ops->add_components && match)
                                           ^^^^^
Patch adds new check.

   294			return -EINVAL;
   295	
   296		/* Reallocate the match array for its true size */
   297		match = component_match_realloc(dev, match, match->num);
                                                            ^^^^^^^^^^
Patch adds unchecked dereference.

   298		if (IS_ERR(match))
   299			return PTR_ERR(match);

regards,
dan carpenter

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-07-07 14:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-07 14:25 component: add support for component match array Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox