git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
pktcdvd: Fix pkt_setup_dev() error path
[pandora-kernel.git]
/
drivers
/
uwb
/
lc-rc.c
diff --git
a/drivers/uwb/lc-rc.c
b/drivers/uwb/lc-rc.c
index
b4395f4
..
cf96b93
100644
(file)
--- a/
drivers/uwb/lc-rc.c
+++ b/
drivers/uwb/lc-rc.c
@@
-36,6
+36,7
@@
#include <linux/etherdevice.h>
#include <linux/usb.h>
#include <linux/slab.h>
#include <linux/etherdevice.h>
#include <linux/usb.h>
#include <linux/slab.h>
+#include <linux/export.h>
#include "uwb-internal.h"
#include "uwb-internal.h"
@@
-55,8
+56,11
@@
static struct uwb_rc *uwb_rc_find_by_index(int index)
struct uwb_rc *rc = NULL;
dev = class_find_device(&uwb_rc_class, NULL, &index, uwb_rc_index_match);
struct uwb_rc *rc = NULL;
dev = class_find_device(&uwb_rc_class, NULL, &index, uwb_rc_index_match);
- if (dev)
+ if (dev)
{
rc = dev_get_drvdata(dev);
rc = dev_get_drvdata(dev);
+ put_device(dev);
+ }
+
return rc;
}
return rc;
}
@@
-367,7
+371,9
@@
struct uwb_rc *__uwb_rc_try_get(struct uwb_rc *target_rc)
if (dev) {
rc = dev_get_drvdata(dev);
__uwb_rc_get(rc);
if (dev) {
rc = dev_get_drvdata(dev);
__uwb_rc_get(rc);
+ put_device(dev);
}
}
+
return rc;
}
EXPORT_SYMBOL_GPL(__uwb_rc_try_get);
return rc;
}
EXPORT_SYMBOL_GPL(__uwb_rc_try_get);
@@
-420,8
+426,11
@@
struct uwb_rc *uwb_rc_get_by_grandpa(const struct device *grandpa_dev)
dev = class_find_device(&uwb_rc_class, NULL, (void *)grandpa_dev,
find_rc_grandpa);
dev = class_find_device(&uwb_rc_class, NULL, (void *)grandpa_dev,
find_rc_grandpa);
- if (dev)
+ if (dev)
{
rc = dev_get_drvdata(dev);
rc = dev_get_drvdata(dev);
+ put_device(dev);
+ }
+
return rc;
}
EXPORT_SYMBOL_GPL(uwb_rc_get_by_grandpa);
return rc;
}
EXPORT_SYMBOL_GPL(uwb_rc_get_by_grandpa);
@@
-454,8
+463,10
@@
struct uwb_rc *uwb_rc_get_by_dev(const struct uwb_dev_addr *addr)
dev = class_find_device(&uwb_rc_class, NULL, (void *)addr,
find_rc_dev);
dev = class_find_device(&uwb_rc_class, NULL, (void *)addr,
find_rc_dev);
- if (dev)
+ if (dev)
{
rc = dev_get_drvdata(dev);
rc = dev_get_drvdata(dev);
+ put_device(dev);
+ }
return rc;
}
return rc;
}