Merge branch 'component-for-driver' of git://ftp.arm.linux.org.uk/~rmk/linux-arm into work-next

Russell writes:

Greg,

Please incorporate a fix for the component helper.
This fixes a bug reported by Sachin Kamat found with Exynos DRM.
This commit is contained in:
Greg Kroah-Hartman 2014-07-07 18:28:32 -07:00
commit 650f81d409
1 changed files with 6 additions and 4 deletions

View File

@ -293,10 +293,12 @@ int component_master_add_with_match(struct device *dev,
if (ops->add_components && match)
return -EINVAL;
/* Reallocate the match array for its true size */
match = component_match_realloc(dev, match, match->num);
if (IS_ERR(match))
return PTR_ERR(match);
if (match) {
/* Reallocate the match array for its true size */
match = component_match_realloc(dev, match, match->num);
if (IS_ERR(match))
return PTR_ERR(match);
}
master = kzalloc(sizeof(*master), GFP_KERNEL);
if (!master)