summaryrefslogtreecommitdiffstats
path: root/drivers/staging/fbtft/fbtft-core.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-10-14 07:07:36 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-10-14 07:07:36 +0200
commit27d6e47f8e133167af51a3e39548cd3e9bed07da (patch)
tree069abe69fc8e247ef9ca4443afc11d04aa1e723c /drivers/staging/fbtft/fbtft-core.c
parent9dc86c234e845a5f60c5af013e647795c784df87 (diff)
parent4f5cafb5cb8471e54afdc9054d973535614f7675 (diff)
downloadlinux-stable-27d6e47f8e133167af51a3e39548cd3e9bed07da.tar.gz
linux-stable-27d6e47f8e133167af51a3e39548cd3e9bed07da.tar.bz2
linux-stable-27d6e47f8e133167af51a3e39548cd3e9bed07da.zip
Merge 5.4-rc3 into staging-next
We want the staging driver fixes in here as well to build on and test with. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/fbtft/fbtft-core.c')
-rw-r--r--drivers/staging/fbtft/fbtft-core.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/staging/fbtft/fbtft-core.c b/drivers/staging/fbtft/fbtft-core.c
index 90eec45d11fc..63d36f21eb98 100644
--- a/drivers/staging/fbtft/fbtft-core.c
+++ b/drivers/staging/fbtft/fbtft-core.c
@@ -714,7 +714,7 @@ struct fb_info *fbtft_framebuffer_alloc(struct fbtft_display *display,
if (par->gamma.curves && gamma) {
if (fbtft_gamma_parse_str(par, par->gamma.curves, gamma,
strlen(gamma)))
- goto alloc_fail;
+ goto release_framebuf;
}
/* Transmit buffer */
@@ -731,7 +731,7 @@ struct fb_info *fbtft_framebuffer_alloc(struct fbtft_display *display,
if (txbuflen > 0) {
txbuf = devm_kzalloc(par->info->device, txbuflen, GFP_KERNEL);
if (!txbuf)
- goto alloc_fail;
+ goto release_framebuf;
par->txbuf.buf = txbuf;
par->txbuf.len = txbuflen;
}
@@ -753,6 +753,9 @@ struct fb_info *fbtft_framebuffer_alloc(struct fbtft_display *display,
return info;
+release_framebuf:
+ framebuffer_release(info);
+
alloc_fail:
vfree(vmem);