Skip to content

Commit bfc1335

Browse files
STrusovmchehab
authored andcommitted
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. Fixes: da22013 ("atomisp: remove indirection from sh_css_malloc") Signed-off-by: Sergei A. Trusov <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
1 parent a607f51 commit bfc1335

File tree

1 file changed

+1
-0
lines changed
  • drivers/staging/media/atomisp/pci/atomisp2/css2400

1 file changed

+1
-0
lines changed

drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1939,6 +1939,7 @@ void *sh_css_calloc(size_t N, size_t size)
19391939
p = sh_css_malloc(N*size);
19401940
if (p)
19411941
memset(p, 0, size);
1942+
return p;
19421943
}
19431944
return NULL;
19441945
}

0 commit comments

Comments
 (0)