]> git.baikalelectronics.ru Git - kernel.git/commit
lib: objagg: Fix an error code in objagg_hints_get()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 13 Feb 2019 08:56:50 +0000 (11:56 +0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 14 Feb 2019 06:13:29 +0000 (22:13 -0800)
commit5969d274f5861b71df9029b29b10e0f935a99735
tree1f482431de21a4480dcb6accb19886058f160e46
parent402bc811b798d6c28fd54a29ccf0055e050c8408
lib: objagg: Fix an error code in objagg_hints_get()

We need to set the error code on this path otherwise we return
ERR_PTR(0) which would result in a NULL dereference in the caller.

Fixes: 7375258e9534 ("lib: objagg: implement optimization hints assembly and use hints for object creation")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
lib/objagg.c