summaryrefslogtreecommitdiff
path: root/common/bmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/bmp.c')
-rw-r--r--common/bmp.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/common/bmp.c b/common/bmp.c
index ad91351f193..57764f3653e 100644
--- a/common/bmp.c
+++ b/common/bmp.c
@@ -31,9 +31,9 @@
* by the caller after use.
*
* Returns NULL if decompression failed, or if the decompressed data
- * didn't contain a valid BMP signature.
+ * didn't contain a valid BMP signature or decompression is not enabled in
+ * Kconfig.
*/
-#if CONFIG_IS_ENABLED(VIDEO_BMP_GZIP)
struct bmp_image *gunzip_bmp(unsigned long addr, unsigned long *lenp,
void **alloc_addr)
{
@@ -41,6 +41,9 @@ struct bmp_image *gunzip_bmp(unsigned long addr, unsigned long *lenp,
unsigned long len;
struct bmp_image *bmp;
+ if (!CONFIG_IS_ENABLED(VIDEO_BMP_GZIP))
+ return NULL;
+
/*
* Decompress bmp image
*/
@@ -77,13 +80,6 @@ struct bmp_image *gunzip_bmp(unsigned long addr, unsigned long *lenp,
*alloc_addr = dst;
return bmp;
}
-#else
-struct bmp_image *gunzip_bmp(unsigned long addr, unsigned long *lenp,
- void **alloc_addr)
-{
- return NULL;
-}
-#endif
#ifdef CONFIG_NEEDS_MANUAL_RELOC
void bmp_reloc(void)