with "mmc: tmio: implement a bounce buffer for unaligned DMA"
gcc generates the following warnings:
drivers/mmc/host/tmio_mmc.c:654:6: warning: 'ret' may be used uninitialized in this function
drivers/mmc/host/tmio_mmc.c:730:6: warning: 'ret' may be used uninitialized in this function
This patch fixes these by setting ret to -EINVAL in the affected code paths.
Signed-off-by: Arnd Hannemann <arnd@arndnet.de>
Signed-off-by: Chris Ball <cjb@laptop.org>
}
if ((!aligned && (host->sg_len > 1 || sg->length > PAGE_CACHE_SIZE ||
- align >= MAX_ALIGN)) || !multiple)
+ align >= MAX_ALIGN)) || !multiple) {
+ ret = -EINVAL;
goto pio;
+ }
/* The only sg element can be unaligned, use our bounce buffer then */
if (!aligned) {
}
if ((!aligned && (host->sg_len > 1 || sg->length > PAGE_CACHE_SIZE ||
- align >= MAX_ALIGN)) || !multiple)
+ align >= MAX_ALIGN)) || !multiple) {
+ ret = -EINVAL;
goto pio;
+ }
/* The only sg element can be unaligned, use our bounce buffer then */
if (!aligned) {