Re: [RFC] wwan: add a new WWAN subsystem

From
David Miller <davem@davemloft.net>
Date
2020-02-25 19:00:36
Also in
linux-wireless
Reply to
Johannes Berg, 2020-02-25
From: Johannes Berg <johannes@sipsolutions.net>
Date: Tue, 25 Feb 2020 11:00:53 +0100
quoted hunk ↗ jump to hunk
+static struct wwan_device *wwan_create(struct device *dev)
+{
+	struct wwan_device *wwan = kzalloc(sizeof(*wwan), GFP_KERNEL);
+	u32 id = ++wwan_id_counter;
+	int err;
+
+	lockdep_assert_held(&wwan_mtx);
+
+	if (WARN_ON(!id))
+		return ERR_PTR(-ENOSPC);
This potentially leaks 'wwan'.
Thread (8 messages) 8 messages, 4 authors, last reply 2020-03-02
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help