Thread (8 messages) 8 messages, 4 authors, 2020-03-02

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

From: Johannes Berg <johannes@sipsolutions.net>
Date: 2020-02-25 19:40:21
Also in: linux-wireless

On Tue, 2020-02-25 at 11:00 -0800, David Miller wrote:
From: Johannes Berg <johannes@sipsolutions.net>
Date: Tue, 25 Feb 2020 11:00:53 +0100
quoted
+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'.
Eagle eyes ... thanks! :)

I suppose this will be totally different if I can integrate with the
component device stuff somehow, will see.

johannes
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help