mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-16 05:50:19 +00:00
arch/arm/plat-pxa/dma.c: correct NULL test
Test the just-allocated value for NULL rather than some other value. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression x,y; statement S; @@ x = \(kmalloc\|kcalloc\|kzalloc\)(...); ( if ((x) == NULL) S | if ( - y + x == NULL) S ) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Cc: Eric Miao <eric.y.miao@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
parent
e5992c05ff
commit
d54690fec7
@ -245,7 +245,7 @@ static void pxa_dma_init_debugfs(void)
|
||||
|
||||
dbgfs_chan = kmalloc(sizeof(*dbgfs_state) * num_dma_channels,
|
||||
GFP_KERNEL);
|
||||
if (!dbgfs_state)
|
||||
if (!dbgfs_chan)
|
||||
goto err_alloc;
|
||||
|
||||
chandir = debugfs_create_dir("channels", dbgfs_root);
|
||||
|
Loading…
Reference in New Issue
Block a user