[XFRM]: Fix missed error setting in xfrm4_policy.c
authorDavid S. Miller <davem@sunset.davemloft.net>
Tue, 6 Feb 2007 22:32:42 +0000 (14:32 -0800)
committerDavid S. Miller <davem@sunset.davemloft.net>
Thu, 8 Feb 2007 20:39:03 +0000 (12:39 -0800)
When we can't find the afinfo we should return EAFNOSUPPORT.
GCC warned about the uninitialized 'err' for this path as well.

Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/xfrm4_policy.c

index 011136a9580987a3075d07c77d1d8c41bdbaac45..699f27ce62ad169b05d996c55c000e68e859c404 100644 (file)
@@ -175,6 +175,7 @@ __xfrm4_bundle_create(struct xfrm_policy *policy, struct xfrm_state **xfrm, int
                afinfo = xfrm_state_get_afinfo(dst_prev->xfrm->props.family);
                if (!afinfo) {
                        dst = *dst_p;
+                       err = -EAFNOSUPPORT;
                        goto error;
                }
                dst_prev->output = afinfo->output;