OSDN Git Service

crypto: sa2ul - fix compiler warning produced by clang
authorTero Kristo <t-kristo@ti.com>
Tue, 25 Aug 2020 13:31:06 +0000 (16:31 +0300)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 11 Sep 2020 04:39:13 +0000 (14:39 +1000)
Clang detects a warning for an assignment that doesn't really do
anything. Fix this by removing the offending piece of code.

Fixes: 7694b6ca649f ("crypto: sa2ul - Add crypto driver")
Reported-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
Tested-by: Nathan Chancellor <natechancellor@gmail.com> # build
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/sa2ul.c

index b685a76..934e9a0 100644 (file)
@@ -1148,12 +1148,10 @@ static int sa_run(struct sa_req *req)
                        ret = sg_split(req->dst, mapped_dst_nents, 0, 1,
                                       &split_size, &dst, &dst_nents,
                                       gfp_flags);
-                       if (ret) {
-                               dst_nents = dst_nents;
+                       if (ret)
                                dst = req->dst;
-                       } else {
+                       else
                                rxd->split_dst_sg = dst;
-                       }
                }
        }