Commit 650f81d4 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

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.
parents 64c720ad b509cc80
...@@ -293,10 +293,12 @@ int component_master_add_with_match(struct device *dev, ...@@ -293,10 +293,12 @@ int component_master_add_with_match(struct device *dev,
if (ops->add_components && match) if (ops->add_components && match)
return -EINVAL; return -EINVAL;
/* Reallocate the match array for its true size */ if (match) {
match = component_match_realloc(dev, match, match->num); /* Reallocate the match array for its true size */
if (IS_ERR(match)) match = component_match_realloc(dev, match, match->num);
return PTR_ERR(match); if (IS_ERR(match))
return PTR_ERR(match);
}
master = kzalloc(sizeof(*master), GFP_KERNEL); master = kzalloc(sizeof(*master), GFP_KERNEL);
if (!master) if (!master)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment