Skip to content

Commit

Permalink
mmc: block: propagate correct returned value in mmc_rpmb_ioctl
Browse files Browse the repository at this point in the history
In commit 9754857 ("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: Mathieu Malaterre <malat@debian.org>
Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com>
Fixes: 9754857 ("mmc: block: Convert RPMB to a character device")
Cc: stable@vger.kernel.org # v4.15+
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
  • Loading branch information
Mathieu Malaterre authored and Ulf Hansson committed May 21, 2018
1 parent 6da6c0d commit b25b750
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mmc/core/block.c
Original file line number Diff line number Diff line change
Expand Up @@ -2485,7 +2485,7 @@ static long mmc_rpmb_ioctl(struct file *filp, unsigned int cmd,
break;
}

return 0;
return ret;
}

#ifdef CONFIG_COMPAT
Expand Down

0 comments on commit b25b750

Please sign in to comment.