Re: [PATCH 4.14 19/26] fbdev: imsttfb: Release framebuffer and dealloc cmap on error path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Greg & Sasha,

The patch below landed in 4.14-stable and breaks build with this error:

drivers/video/fbdev/imsttfb.c:1457:3: error: void function 'init_imstt' should not return a value [-Wreturn-type]
                   return -ENODEV;
                   ^      ~~~~~~~
   1 error generated.


I suggest to simply drop (revert) it again from the v4.14-stable tree.
Shall I send a revert-patch, or can you do it manually?

Helge



On 6/26/23 20:11, Greg Kroah-Hartman wrote:
From: Helge Deller <deller@xxxxxx>

[ Upstream commit 5cf9a090a39c97f4506b7b53739d469b1c05a7e9 ]

Add missing cleanups in error path.

Signed-off-by: Helge Deller <deller@xxxxxx>
Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>
---
  drivers/video/fbdev/imsttfb.c | 6 +++++-
  1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/video/fbdev/imsttfb.c b/drivers/video/fbdev/imsttfb.c
index ecdcf358ad5ea..6589d5f0a5a40 100644
--- a/drivers/video/fbdev/imsttfb.c
+++ b/drivers/video/fbdev/imsttfb.c
@@ -1452,9 +1452,13 @@ static void init_imstt(struct fb_info *info)
  	              FBINFO_HWACCEL_FILLRECT |
  	              FBINFO_HWACCEL_YPAN;

-	fb_alloc_cmap(&info->cmap, 0, 0);
+	if (fb_alloc_cmap(&info->cmap, 0, 0)) {
+		framebuffer_release(info);
+		return -ENODEV;
+	}

  	if (register_framebuffer(info) < 0) {
+		fb_dealloc_cmap(&info->cmap);
  		framebuffer_release(info);
  		return;
  	}





[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux