mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 02:10:52 +07:00
net: qrtr: Fix error pointer vs NULL bugs
The callers only expect NULL pointers, so returning an error pointer
will lead to an Oops.
Fixes: 0c2204a4ad
("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>
This commit is contained in:
parent
1ac7b090ec
commit
9baeea5071
@ -76,7 +76,7 @@ static struct qrtr_node *node_get(unsigned int node_id)
|
||||
/* 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;
|
||||
|
||||
@ -224,7 +224,7 @@ static struct qrtr_server *server_add(unsigned int service,
|
||||
|
||||
srv = kzalloc(sizeof(*srv), GFP_KERNEL);
|
||||
if (!srv)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
return NULL;
|
||||
|
||||
srv->service = service;
|
||||
srv->instance = instance;
|
||||
|
Loading…
Reference in New Issue
Block a user