[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1521107725-25027-4-git-send-email-aspriel@gmail.com>
Date: Thu, 15 Mar 2018 10:55:25 +0100
From: Arend van Spriel <aspriel@...il.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: LKML <linux-kernel@...r.kernel.org>,
Brian Norris <briannorris@...omium.org>,
Arend van Spriel <aspriel@...il.com>
Subject: [PATCH for-4.16 3/3] 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@...il.com>
---
drivers/base/dd.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/base/dd.c b/drivers/base/dd.c
index de6fd09..c9f5408 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;
--
1.9.1
Powered by blists - more mailing lists