staging: fbtft: Removes one nesting level to help readability - Style

This nesting level was removed to improve readability.

Signed-off-by: Leonardo Brás <leobras.c@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Leonardo Brás 2018-08-07 21:29:04 -03:00 коммит произвёл Greg Kroah-Hartman
Родитель d9932c8be0
Коммит 5bfac06f3e
1 изменённых файлов: 15 добавлений и 12 удалений

Просмотреть файл

@ -679,19 +679,22 @@ static int flexfb_probe_common(struct spi_device *sdev,
if (par->spi->master->bits_per_word_mask
& SPI_BPW_MASK(9)) {
par->spi->bits_per_word = 9;
} else {
dev_warn(dev,
"9-bit SPI not available, emulating using 8-bit.\n");
/* allocate buffer with room for dc bits */
par->extra = devm_kzalloc(par->info->device,
par->txbuf.len + (par->txbuf.len / 8) + 8,
GFP_KERNEL);
if (!par->extra) {
ret = -ENOMEM;
goto out_release;
}
par->fbtftops.write = fbtft_write_spi_emulate_9;
break;
}
dev_warn(dev,
"9-bit SPI not available, emulating using 8-bit.\n");
/* allocate buffer with room for dc bits */
par->extra = devm_kzalloc(par->info->device,
par->txbuf.len
+ (par->txbuf.len / 8) + 8,
GFP_KERNEL);
if (!par->extra) {
ret = -ENOMEM;
goto out_release;
}
par->fbtftops.write = fbtft_write_spi_emulate_9;
break;
default:
dev_err(dev,