YueHaibing af322ba0eb xfrm: fix 'passing zero to ERR_PTR()' warning
[ Upstream commit 934ffce1343f22ed5e2d0bd6da4440f4848074de ]

Fix a static code checker warning:

  net/xfrm/xfrm_policy.c:1836 xfrm_resolve_and_create_bundle() warn: passing zero to 'ERR_PTR'

xfrm_tmpl_resolve return 0 just means no xdst found, return NULL
instead of passing zero to ERR_PTR.

Fixes: d809ec895505 ("xfrm: do not assume that template resolving always returns xfrms")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-26 08:36:31 +02:00
..
2018-05-16 10:08:44 +02:00
2018-04-13 19:48:29 +02:00
2016-10-20 11:23:08 -04:00
2018-09-26 08:36:30 +02:00
2016-08-17 19:36:23 -04:00
2016-08-17 19:36:23 -04:00