]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
media: av7110: coding style fixes: miscellaneous
authorStefan Herdler <herdler@nurfuerspam.de>
Tue, 7 May 2024 00:24:57 +0000 (02:24 +0200)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Tue, 4 Jun 2024 14:19:56 +0000 (16:19 +0200)
This patch fixes the following checkpatch warnings:

WARNING:OOM_MESSAGE: Possible unnecessary 'out of memory' message
CHECK:MACRO_ARG_REUSE: Macro argument reuse 'fe_func' - possible side-effects?

The MACRO_ARG_REUSE isn't really fixed but marked as intentional.
The comment is visible in the checkpatch warning.

Signed-off-by: Stefan Herdler <herdler@nurfuerspam.de>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
drivers/staging/media/av7110/av7110.c
drivers/staging/media/av7110/av7110_ipack.c

index 14c512fdfa4741675a35a56fbff38527321dcdac..30e2e6e65148e215cfc1ae76b22f3d9de571cc27 100644 (file)
@@ -108,7 +108,7 @@ static int av7110_num;
                av7110_copy = fe_func; \
                fe_func = av7110_func; \
        } \
-}
+}    /* Macro argument reuse of 'fe_func' is intentional! */
 
 static void init_av7110_av(struct av7110 *av7110)
 {
index c41a233e178c29b75f138accddf3afc7ff7516a7..9631aae71fc00120493ca266b642bcae17c3e4f8 100644 (file)
@@ -23,10 +23,8 @@ int av7110_ipack_init(struct ipack *p, int size,
                      void (*func)(u8 *buf, int size, void *priv))
 {
        p->buf = vmalloc(size);
-       if (!p->buf) {
-               printk(KERN_WARNING "Couldn't allocate memory for ipack\n");
+       if (!p->buf)
                return -ENOMEM;
-       }
        p->size = size;
        p->func = func;
        p->repack_subids = 0;