dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] GPU:drm: returning ENOMEM
@ 2021-08-28 15:40 F.A.Sulaiman
  2021-08-29  0:46 ` Sam Ravnborg
  2021-08-30 16:02 ` [PATCH v2] GPU:DRM: " F.A.Sulaiman
  0 siblings, 2 replies; 4+ messages in thread
From: F.A.Sulaiman @ 2021-08-28 15:40 UTC (permalink / raw)
  To: airlied, sean, tzimmermann, airlied, daniel
  Cc: F.A.Sulaiman, dri-devel, linux-kernel

When memory allocation is failed this patch returns out of memory error instead of -1.

Signed-off-by: F.A. SULAIMAN <asha.16@itfac.mrt.ac.lk>
---
 drivers/gpu/drm/udl/udl_connector.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/udl/udl_connector.c b/drivers/gpu/drm/udl/udl_connector.c
index 3750fd216131..afebab6186ab 100644
--- a/drivers/gpu/drm/udl/udl_connector.c
+++ b/drivers/gpu/drm/udl/udl_connector.c
@@ -24,7 +24,7 @@ static int udl_get_edid_block(void *data, u8 *buf, unsigned int block,
 
 	read_buff = kmalloc(2, GFP_KERNEL);
 	if (!read_buff)
-		return -1;
+		return -ENOMEM;
 
 	for (i = 0; i < len; i++) {
 		int bval = (i + block * EDID_LENGTH) << 8;
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-08-30 16:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-28 15:40 [PATCH] GPU:drm: returning ENOMEM F.A.Sulaiman
2021-08-29  0:46 ` Sam Ravnborg
2021-08-30 16:02 ` [PATCH v2] GPU:DRM: " F.A.Sulaiman
2021-08-30 16:06   ` Simon Ser

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox