Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 996a6a39 authored by Christian Lamparter's avatar Christian Lamparter Committed by Greg Kroah-Hartman
Browse files

crypto: crypto4xx - remove bad list_del



commit a728a196d253530f17da5c86dc7dfbe58c5f7094 upstream.

alg entries are only added to the list, after the registration
was successful. If the registration failed, it was never added
to the list in the first place.

Signed-off-by: default avatarChristian Lamparter <chunkeey@googlemail.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarAmit Pundir <amit.pundir@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent dc3782a3
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -1033,13 +1033,11 @@ int crypto4xx_register_alg(struct crypto4xx_device *sec_dev,
			break;
		}

		if (rc) {
			list_del(&alg->entry);
		if (rc)
			kfree(alg);
		} else {
		else
			list_add_tail(&alg->entry, &sec_dev->alg_list);
	}
	}

	return 0;
}