Commit b25b750d authored by Mathieu Malaterre's avatar Mathieu Malaterre Committed by Ulf Hansson

mmc: block: propagate correct returned value in mmc_rpmb_ioctl

In commit 97548575 ("mmc: block: Convert RPMB to a character device") a
new function `mmc_rpmb_ioctl` was added. The final return is simply
returning a value of `0` instead of propagating the correct return code.

Discovered during a compilation with W=1, silence the following gcc warning

drivers/mmc/core/block.c:2470:6: warning: variable ‘ret’ set but not used
[-Wunused-but-set-variable]
Signed-off-by: default avatarMathieu Malaterre <malat@debian.org>
Reviewed-by: default avatarShawn Lin <shawn.lin@rock-chips.com>
Fixes: 97548575 ("mmc: block: Convert RPMB to a character device")
Cc: stable@vger.kernel.org # v4.15+
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent 6da6c0db
......@@ -2485,7 +2485,7 @@ static long mmc_rpmb_ioctl(struct file *filp, unsigned int cmd,
break;
}
return 0;
return ret;
}
#ifdef CONFIG_COMPAT
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment