diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-10-19 22:05:38 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-10-19 22:05:38 +0200 |
commit | a7204d72db251784808b0c050220992d7f833a2c (patch) | |
tree | 3491452ea74b039f3278fd95bb7ad7c88b6b3631 /arch/powerpc/kernel/vio.c | |
parent | i2o: convert bus code to use dev_groups (diff) | |
parent | Linux 3.12-rc6 (diff) | |
download | linux-a7204d72db251784808b0c050220992d7f833a2c.tar.xz linux-a7204d72db251784808b0c050220992d7f833a2c.zip |
Merge 3.12-rc6 into driver-core-next
We want these fixes here too.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/powerpc/kernel/vio.c')
-rw-r--r-- | arch/powerpc/kernel/vio.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/arch/powerpc/kernel/vio.c b/arch/powerpc/kernel/vio.c index 0126c297fe88..408956fbf4f6 100644 --- a/arch/powerpc/kernel/vio.c +++ b/arch/powerpc/kernel/vio.c @@ -1536,11 +1536,15 @@ static ssize_t modalias_show(struct device *dev, struct device_attribute *attr, const char *cp; dn = dev->of_node; - if (!dn) - return -ENODEV; + if (!dn) { + strcat(buf, "\n"); + return strlen(buf); + } cp = of_get_property(dn, "compatible", NULL); - if (!cp) - return -ENODEV; + if (!cp) { + strcat(buf, "\n"); + return strlen(buf); + } return sprintf(buf, "vio:T%sS%s\n", vio_dev->type, cp); } |