Skip to content

Commit

Permalink
drivers: base: remove check for callback in coredump_store()
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
aspriel authored and gregkh committed Mar 23, 2018
1 parent d723522 commit 1fe56e0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/base/dd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 1fe56e0

Please sign in to comment.