re: component: add support for component match array

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux