summaryrefslogtreecommitdiffstats
path: root/drivers/base/dd.c
diff options
context:
space:
mode:
authorArend van Spriel <aspriel@gmail.com>2018-03-15 10:55:25 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-03-23 18:08:02 +0100
commit1fe56e0cafd7e4cf26f3582aad0c7705fceff498 (patch)
treeb79ebd89a098338ef04830acaa86fff3bb473c7b /drivers/base/dd.c
parentd723522b0be497dc836b759552a1c97a814d9e86 (diff)
downloadlinux-1fe56e0cafd7e4cf26f3582aad0c7705fceff498.tar.bz2
drivers: base: remove check for callback in coredump_store()
The check for the .coredump() callback in coredump_store() is redundant. It is already assured the device driver implements the callback upon creating the coredump sysfs entry. Signed-off-by: Arend van Spriel <aspriel@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base/dd.c')
-rw-r--r--drivers/base/dd.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/base/dd.c b/drivers/base/dd.c
index de6fd092bf2f..c9f54089429b 100644
--- a/drivers/base/dd.c
+++ b/drivers/base/dd.c
@@ -292,8 +292,7 @@ static ssize_t coredump_store(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
{
device_lock(dev);
- if (dev->driver->coredump)
- dev->driver->coredump(dev);
+ dev->driver->coredump(dev);
device_unlock(dev);
return count;