From: "F.A.Sulaiman" <asha.16@itfac.mrt.ac.lk>
To: airlied@redhat.com, sean@poorly.run, tzimmermann@suse.de,
airlied@linux.ie, daniel@ffwll.ch
Cc: "F.A.Sulaiman" <asha.16@itfac.mrt.ac.lk>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: [PATCH] GPU:drm: returning ENOMEM
Date: Sat, 28 Aug 2021 21:10:27 +0530 [thread overview]
Message-ID: <20210828154027.8198-1-asha.16@itfac.mrt.ac.lk> (raw)
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
next reply other threads:[~2021-08-28 15:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-28 15:40 F.A.Sulaiman [this message]
2021-08-30 16:02 ` [PATCH v2] GPU:DRM: " F.A.Sulaiman
2021-08-30 16:06 ` Simon Ser
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210828154027.8198-1-asha.16@itfac.mrt.ac.lk \
--to=asha.16@itfac.mrt.ac.lk \
--cc=airlied@linux.ie \
--cc=airlied@redhat.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sean@poorly.run \
--cc=tzimmermann@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®