diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2017-11-09 18:09:28 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-12-20 10:10:23 +0100 |
commit | d6f59ef5b840c5815430d63bb08e8dcbd9e2a132 (patch) | |
tree | 8450fad5261b58098bc64390ae6c50420b4d69d6 /drivers/video | |
parent | df235d2ee36e70a43b122c0eb34064794ef4464c (diff) | |
download | linux-stable-d6f59ef5b840c5815430d63bb08e8dcbd9e2a132.tar.gz linux-stable-d6f59ef5b840c5815430d63bb08e8dcbd9e2a132.tar.bz2 linux-stable-d6f59ef5b840c5815430d63bb08e8dcbd9e2a132.zip |
video: fbdev: au1200fb: Return an error code if a memory allocation fails
[ Upstream commit 8cae353e6b01ac3f18097f631cdbceb5ff28c7f3 ]
'ret' is known to be 0 at this point.
In case of memory allocation error in 'framebuffer_alloc()', return
-ENOMEM instead.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/fbdev/au1200fb.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/video/fbdev/au1200fb.c b/drivers/video/fbdev/au1200fb.c index 99d6cfb168b5..6c542d0ca076 100644 --- a/drivers/video/fbdev/au1200fb.c +++ b/drivers/video/fbdev/au1200fb.c @@ -1681,8 +1681,10 @@ static int au1200fb_drv_probe(struct platform_device *dev) fbi = framebuffer_alloc(sizeof(struct au1200fb_device), &dev->dev); - if (!fbi) + if (!fbi) { + ret = -ENOMEM; goto failed; + } _au1200fb_infos[plane] = fbi; fbdev = fbi->par; |