The callers only expect NULL pointers, so returning an error pointer
will lead to an Oops.
Fixes: 0c2204a4ad71 ("net: qrtr: Migrate nameservice to kernel from userspace")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
/* If node didn't exist, allocate and insert it to the tree */
node = kzalloc(sizeof(*node), GFP_KERNEL);
if (!node)
- return ERR_PTR(-ENOMEM);
+ return NULL;
node->id = node_id;
srv = kzalloc(sizeof(*srv), GFP_KERNEL);
if (!srv)
- return ERR_PTR(-ENOMEM);
+ return NULL;
srv->service = service;
srv->instance = instance;