[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171108205049.27612-20-alexander.levin@verizon.com>
Date: Wed, 8 Nov 2017 20:50:59 +0000
From: "Levin, Alexander (Sasha Levin)" <alexander.levin@....verizon.com>
To: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"stable@...r.kernel.org" <stable@...r.kernel.org>
CC: Arvind Yadav <arvind.yadav.cs@...il.com>,
Daniel Vetter <daniel.vetter@...ll.ch>,
"Levin, Alexander (Sasha Levin)" <alexander.levin@....verizon.com>
Subject: [PATCH AUTOSEL for-3.18 20/27] gpu: drm: mgag200: mgag200_main:-
Handle error from pci_iomap
From: Arvind Yadav <arvind.yadav.cs@...il.com>
[ Upstream commit 4b0ea93f250afc6c1128e201b0a8a115ae613e47 ]
Here, pci_iomap can fail, handle this case and return -ENOMEM.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@...il.com>
Signed-off-by: Daniel Vetter <daniel.vetter@...ll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1483443027-13444-1-git-send-email-arvind.yadav.cs@gmail.com
Signed-off-by: Sasha Levin <alexander.levin@...izon.com>
---
drivers/gpu/drm/mgag200/mgag200_main.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/mgag200/mgag200_main.c b/drivers/gpu/drm/mgag200/mgag200_main.c
index f6b283b8375e..d8352e47774d 100644
--- a/drivers/gpu/drm/mgag200/mgag200_main.c
+++ b/drivers/gpu/drm/mgag200/mgag200_main.c
@@ -138,6 +138,8 @@ static int mga_vram_init(struct mga_device *mdev)
}
mem = pci_iomap(mdev->dev->pdev, 0, 0);
+ if (!mem)
+ return -ENOMEM;
mdev->mc.vram_size = mga_probe_vram(mdev, mem);
--
2.11.0
Powered by blists - more mailing lists