From: Arend van Spriel Date: Thu, 15 Mar 2018 09:55:25 +0000 (+0100) Subject: drivers: base: remove check for callback in coredump_store() X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=1fe56e0cafd7e4cf26f3582aad0c7705fceff498;p=openwrt%2Fstaging%2Fblogic.git 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 Signed-off-by: Greg Kroah-Hartman --- 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;