Skip to contentSkip to conversation

media: staging: atomisp: sh_css_calloc shall return a pointer to the allocated space

PATCH Applied Sergei A. Trusov 3 participants 3 messages Aug 2, 2017 – Aug 8, 2017

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 media: staging: atomisp: sh_css_calloc shall return a pointer to the allocated space

The calloc function returns either a null pointer or a pointer to the allocated space. Add the second case that is missed.

---
 drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c | 1 +
 1 file changed, 1 insertion(+)
drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c +1 -0
index 471f2be974e2..e882b5596813 100644
@@ -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;
 }
#1 lore raw
Quoted 2 lines · 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.

gads.

Bug added by commit da22013f7df4 ("atomisp: remove indirection from sh_css_malloc")

These wrappers should really be deleted.

Applied
#2 lore raw
Quoted 10 lines · Joe Perches
Quoted 2 lines · 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.

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!

Signature · 2 lines
Sakari Ailus
e-mail: [email protected]	XMPP: [email protected]