public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] s390: correct misuses of module_put in appldata_generic_handler.
@ 2014-03-15 13:35 Zhouyi Zhou
  2014-03-17 13:28 ` Gerald Schaefer
  0 siblings, 1 reply; 5+ messages in thread
From: Zhouyi Zhou @ 2014-03-15 13:35 UTC (permalink / raw)
  To: linux-kernel, linux-s390, joe, gang.chen, gerald.schaefer,
	linux390, heiko.carstens, schwidefsky
  Cc: Zhouyi Zhou, Zhouyi Zhou

correct misuses of module_put in  appldata_generic_handler

Signed-off-by: Zhouyi Zhou <yizhouzhou@ict.ac.cn>
---
 arch/s390/appldata/appldata_base.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/arch/s390/appldata/appldata_base.c b/arch/s390/appldata/appldata_base.c
index 47c8630..683e0282 100644
--- a/arch/s390/appldata/appldata_base.c
+++ b/arch/s390/appldata/appldata_base.c
@@ -343,7 +343,6 @@ appldata_generic_handler(struct ctl_table *ctl, int write,
 		// protect work queue callback
 		if (!try_module_get(ops->owner)) {
 			mutex_unlock(&appldata_ops_mutex);
-			module_put(ops->owner);
 			return -ENODEV;
 		}
 		ops->callback(ops->data);	// init record
@@ -354,7 +353,6 @@ appldata_generic_handler(struct ctl_table *ctl, int write,
 		if (rc != 0) {
 			pr_err("Starting the data collection for %s "
 			       "failed with rc=%d\n", ops->name, rc);
-			module_put(ops->owner);
 		} else
 			ops->active = 1;
 	} else if ((buf[0] == '0') && (ops->active == 1)) {
@@ -365,7 +363,6 @@ appldata_generic_handler(struct ctl_table *ctl, int write,
 		if (rc != 0)
 			pr_err("Stopping the data collection for %s "
 			       "failed with rc=%d\n", ops->name, rc);
-		module_put(ops->owner);
 	}
 	mutex_unlock(&appldata_ops_mutex);
 out:
-- 
1.8.1.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-03-19  0:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-15 13:35 [PATCH] s390: correct misuses of module_put in appldata_generic_handler Zhouyi Zhou
2014-03-17 13:28 ` Gerald Schaefer
2014-03-18  1:24   ` Zhouyi Zhou
2014-03-18 13:34     ` Gerald Schaefer
2014-03-19  0:59       ` Zhouyi Zhou

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox