Skip to content

Commit 230e9a7

Browse files
Stefan Herdleropsiff
authored andcommitted
media: av7110: coding style fixes: miscellaneous
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> (cherry picked from commit 64b8402) Stable-dep-of: 458ea1c ("media: av7110: fix a spectre vulnerability") Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
1 parent 08bdcb1 commit 230e9a7

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

drivers/staging/media/av7110/av7110.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ static int av7110_num;
108108
av7110_copy = fe_func; \
109109
fe_func = av7110_func; \
110110
} \
111-
}
111+
} /* Macro argument reuse of 'fe_func' is intentional! */
112112

113113
static void init_av7110_av(struct av7110 *av7110)
114114
{

drivers/staging/media/av7110/av7110_ipack.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,8 @@ int av7110_ipack_init(struct ipack *p, int size,
2323
void (*func)(u8 *buf, int size, void *priv))
2424
{
2525
p->buf = vmalloc(size);
26-
if (!p->buf) {
27-
printk(KERN_WARNING "Couldn't allocate memory for ipack\n");
26+
if (!p->buf)
2827
return -ENOMEM;
29-
}
3028
p->size = size;
3129
p->func = func;
3230
p->repack_subids = 0;

0 commit comments

Comments
 (0)