2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-11-25 19:14:39 +08:00

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>
This commit is contained in:
Arend van Spriel 2018-03-15 10:55:25 +01:00 committed by Greg Kroah-Hartman
parent d723522b0b
commit 1fe56e0caf

View File

@ -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;