From: Wolfram Sang <w.sang@pengutronix.de>
Date: Wed, 29 Jul 2009 12:25:37 +0000 (+0200)
Subject: pcmcia: document return value of pcmcia_loop_config
X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=889c27744c30eb7a43b68c11e33e679cfafc8cd5;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git

pcmcia: document return value of pcmcia_loop_config

Hopefully it will be harder to get it wrong now. Also fix an unneeded
initialization while we are here.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---

diff --git a/drivers/pcmcia/pcmcia_resource.c b/drivers/pcmcia/pcmcia_resource.c
index 8c2db2ac8f8..d919e96c0af 100644
--- a/drivers/pcmcia/pcmcia_resource.c
+++ b/drivers/pcmcia/pcmcia_resource.c
@@ -902,7 +902,7 @@ struct pcmcia_cfg_mem {
  *
  * pcmcia_loop_config() loops over all configuration options, and calls
  * the driver-specific conf_check() for each one, checking whether
- * it is a valid one.
+ * it is a valid one. Returns 0 on success or errorcode otherwise.
  */
 int pcmcia_loop_config(struct pcmcia_device *p_dev,
 		       int	(*conf_check)	(struct pcmcia_device *p_dev,
@@ -915,7 +915,7 @@ int pcmcia_loop_config(struct pcmcia_device *p_dev,
 	struct pcmcia_cfg_mem *cfg_mem;
 
 	tuple_t *tuple;
-	int ret = -ENODEV;
+	int ret;
 	unsigned int vcc;
 
 	cfg_mem = kzalloc(sizeof(struct pcmcia_cfg_mem), GFP_KERNEL);