From: "Sergei A. Trusov" <sergei.a.trusov@ya.ru>
To: Mauro Carvalho Chehab <mchehab@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Alan Cox <alan@llwyncelyn.cymru>,
Hans Verkuil <hans.verkuil@cisco.com>,
Joe Perches <joe@perches.com>,
simran singhal <singhalsimran0@gmail.com>,
linux-media@vger.kernel.org, devel@driverdev.osuosl.org
Cc: "Sergei A. Trusov" <sergei.a.trusov@ya.ru>
Subject: [PATCH] media: staging: atomisp: sh_css_calloc shall return a pointer to the allocated space
Date: Wed, 02 Aug 2017 18:00:01 +1000 [thread overview]
Message-ID: <1859135.Zd3QESt5CR@z12> (raw)
The calloc function returns either a null pointer or a pointer to the
allocated space. Add the second case that is missed.
Signed-off-by: Sergei A. Trusov <sergei.a.trusov@ya.ru>
---
drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c
index 471f2be974e2..e882b5596813 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c
@@ -1939,6 +1939,7 @@ void *sh_css_calloc(size_t N, size_t size)
p = sh_css_malloc(N*size);
if (p)
memset(p, 0, size);
+ return p;
}
return NULL;
}
next reply other threads:[~2017-08-02 8:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-02 8:00 Sergei A. Trusov [this message]
2017-08-02 8:11 ` [PATCH] media: staging: atomisp: sh_css_calloc shall return a pointer to the allocated space Joe Perches
2017-08-08 13:00 ` Sakari Ailus
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=1859135.Zd3QESt5CR@z12 \
--to=sergei.a.trusov@ya.ru \
--cc=alan@llwyncelyn.cymru \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=hans.verkuil@cisco.com \
--cc=joe@perches.com \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=singhalsimran0@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.