diff options
author | Greg Kroah-Hartman | 2014-07-08 03:28:32 +0200 |
---|---|---|
committer | Greg Kroah-Hartman | 2014-07-08 03:28:32 +0200 |
commit | 650f81d40957cf5bc07de1210591339c6242a361 (patch) | |
tree | d08efd2564b7139677def312872c84baf9b07d79 | |
parent | Merge 3.16-rc4 into driver-core-next (diff) | |
parent | component: fix bug with legacy API (diff) | |
download | kernel-qcow2-linux-650f81d40957cf5bc07de1210591339c6242a361.tar.gz kernel-qcow2-linux-650f81d40957cf5bc07de1210591339c6242a361.tar.xz kernel-qcow2-linux-650f81d40957cf5bc07de1210591339c6242a361.zip |
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.
-rw-r--r-- | drivers/base/component.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/base/component.c b/drivers/base/component.c index b4236daed4fa..f748430bb654 100644 --- a/drivers/base/component.c +++ b/drivers/base/component.c @@ -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) |