]> git.baikalelectronics.ru Git - kernel.git/commit
module: prevent warning when finit_module a 0 sized file
authorSasha Levin <sasha.levin@oracle.com>
Thu, 3 Jan 2013 00:39:53 +0000 (11:09 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Thu, 3 Jan 2013 00:40:32 +0000 (11:10 +1030)
commitea68606472917b1b7d36787629b605837e366de3
tree5a5d4536de0898ed4ae4a012979e0ce17fdfb2ff
parent08c5ca906ca4e6bba438372518c84c0d902eb25f
module: prevent warning when finit_module a 0 sized file

If we try to finit_module on a file sized 0 bytes vmalloc will
scream and spit out a warning.

Since modules have to be bigger than 0 bytes anyways we can just
check that beforehand and avoid the warning.

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
kernel/module.c