* [PATCH] media: staging: atomisp: sh_css_calloc shall return a pointer to the allocated space
@ 2017-08-02 8:00 Sergei A. Trusov
2017-08-02 8:11 ` Joe Perches
0 siblings, 1 reply; 3+ messages in thread
From: Sergei A. Trusov @ 2017-08-02 8:00 UTC (permalink / raw)
To: Mauro Carvalho Chehab, Greg Kroah-Hartman, Alan Cox, Hans Verkuil,
Joe Perches, simran singhal, linux-media, devel
Cc: Sergei A. Trusov
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;
}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] media: staging: atomisp: sh_css_calloc shall return a pointer to the allocated space
2017-08-02 8:00 [PATCH] media: staging: atomisp: sh_css_calloc shall return a pointer to the allocated space Sergei A. Trusov
@ 2017-08-02 8:11 ` Joe Perches
2017-08-08 13:00 ` Sakari Ailus
0 siblings, 1 reply; 3+ messages in thread
From: Joe Perches @ 2017-08-02 8:11 UTC (permalink / raw)
To: Sergei A. Trusov, Mauro Carvalho Chehab, Greg Kroah-Hartman,
Alan Cox, Hans Verkuil, simran singhal, linux-media, devel
On Wed, 2017-08-02 at 18:00 +1000, Sergei A. Trusov wrote:
> The calloc function returns either a null pointer or a pointer to the
> allocated space. Add the second case that is missed.
gads.
Bug added by commit da22013f7df4 ("atomisp: remove indirection from
sh_css_malloc")
These wrappers should really be deleted.
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] media: staging: atomisp: sh_css_calloc shall return a pointer to the allocated space
2017-08-02 8:11 ` Joe Perches
@ 2017-08-08 13:00 ` Sakari Ailus
0 siblings, 0 replies; 3+ messages in thread
From: Sakari Ailus @ 2017-08-08 13:00 UTC (permalink / raw)
To: Joe Perches
Cc: Sergei A. Trusov, Mauro Carvalho Chehab, Greg Kroah-Hartman,
Alan Cox, Hans Verkuil, simran singhal, linux-media, devel
On Wed, Aug 02, 2017 at 01:11:06AM -0700, Joe Perches wrote:
> On Wed, 2017-08-02 at 18:00 +1000, Sergei A. Trusov wrote:
> > The calloc function returns either a null pointer or a pointer to the
> > allocated space. Add the second case that is missed.
>
> gads.
>
> Bug added by commit da22013f7df4 ("atomisp: remove indirection from
> sh_css_malloc")
>
> These wrappers should really be deleted.
Applied, with the appropriate Fixes: header.
Thanks!
--
Sakari Ailus
e-mail: sakari.ailus@iki.fi XMPP: sailus@retiisi.org.uk
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-08-08 13:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-02 8:00 [PATCH] media: staging: atomisp: sh_css_calloc shall return a pointer to the allocated space Sergei A. Trusov
2017-08-02 8:11 ` Joe Perches
2017-08-08 13:00 ` Sakari Ailus
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox