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

Commit 0194101b authored by Dinesh K Garg's avatar Dinesh K Garg
Browse files

md: dm-req-crypt: Initialize auto variable



req_crypt_should_encrypt() and req_crypt_should_deccrypt() APIs are
using variable ret without initialization. This could cause these APIs
to return wrong values. Initialized ret with proper value.

Change-Id: I42ec8c12f02bf22b0434c3931842609cd9a8b8e0
Signed-off-by: default avatarDinesh K Garg <dineshg@codeaurora.org>
parent 0d88d69d
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -137,7 +137,7 @@ static void req_crypt_split_io_complete


static  bool req_crypt_should_encrypt(struct req_dm_crypt_io *req)
static  bool req_crypt_should_encrypt(struct req_dm_crypt_io *req)
{
{
	int ret;
	int ret = 0;
	bool should_encrypt = false;
	bool should_encrypt = false;
	struct bio *bio = NULL;
	struct bio *bio = NULL;
	bool is_encrypted = false;
	bool is_encrypted = false;
@@ -164,7 +164,7 @@ static bool req_crypt_should_encrypt(struct req_dm_crypt_io *req)


static  bool req_crypt_should_deccrypt(struct req_dm_crypt_io *req)
static  bool req_crypt_should_deccrypt(struct req_dm_crypt_io *req)
{
{
	int ret;
	int ret = 0;
	bool should_deccrypt = false;
	bool should_deccrypt = false;
	struct bio *bio = NULL;
	struct bio *bio = NULL;
	bool is_encrypted = false;
	bool is_encrypted = false;