unload_nls() can be called with a NULL pointer now. Remove the pointer checks and the NULLification of the pointers as the data structure which contains the pointers is kfree'd right away. Signed-off-by: Thomas Gleixner Cc: Petr Vandrovec --- fs/ncpfs/inode.c | 12 ++---------- fs/ncpfs/ioctl.c | 6 ++---- 2 files changed, 4 insertions(+), 14 deletions(-) Index: linux-2.6-tip/fs/ncpfs/inode.c =================================================================== --- linux-2.6-tip.orig/fs/ncpfs/inode.c +++ linux-2.6-tip/fs/ncpfs/inode.c @@ -746,16 +746,8 @@ static void ncp_put_super(struct super_b #ifdef CONFIG_NCPFS_NLS /* unload the NLS charsets */ - if (server->nls_vol) - { - unload_nls(server->nls_vol); - server->nls_vol = NULL; - } - if (server->nls_io) - { - unload_nls(server->nls_io); - server->nls_io = NULL; - } + unload_nls(server->nls_vol); + unload_nls(server->nls_io); #endif /* CONFIG_NCPFS_NLS */ if (server->info_filp) Index: linux-2.6-tip/fs/ncpfs/ioctl.c =================================================================== --- linux-2.6-tip.orig/fs/ncpfs/ioctl.c +++ linux-2.6-tip/fs/ncpfs/ioctl.c @@ -223,10 +223,8 @@ ncp_set_charsets(struct ncp_server* serv oldset_io = server->nls_io; server->nls_io = iocharset; - if (oldset_cp) - unload_nls(oldset_cp); - if (oldset_io) - unload_nls(oldset_io); + unload_nls(oldset_cp); + unload_nls(oldset_io); return 0; } -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/