summaryrefslogtreecommitdiffstats
path: root/drivers/uwb/uwb-internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/uwb/uwb-internal.h')
-rw-r--r--drivers/uwb/uwb-internal.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/uwb/uwb-internal.h b/drivers/uwb/uwb-internal.h
index a7494bf1008..9a103b100f1 100644
--- a/drivers/uwb/uwb-internal.h
+++ b/drivers/uwb/uwb-internal.h
@@ -55,7 +55,8 @@ static inline struct uwb_rc *__uwb_rc_get(struct uwb_rc *rc)
static inline void __uwb_rc_put(struct uwb_rc *rc)
{
- uwb_dev_put(&rc->uwb_dev);
+ if (rc)
+ uwb_dev_put(&rc->uwb_dev);
}
extern int uwb_rc_reset(struct uwb_rc *rc);