summaryrefslogtreecommitdiff
path: root/arch/um/drivers/vector_kern.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-11-01 01:46:16 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2018-11-01 01:46:16 +0300
commit9bb9d4fdce9e6b351b7b905f150745a0fccccc06 (patch)
tree75a9caf075e1979ab2e302076c1b0d5478df992d /arch/um/drivers/vector_kern.c
parentadb6b2b2b59f7872322f255206583b4c3ce661a3 (diff)
parent917e2fd2c53eb3c4162f5397555cbd394390d4bc (diff)
downloadlinux-9bb9d4fdce9e6b351b7b905f150745a0fccccc06.tar.xz
Merge branch 'for-linus-4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml
Pull UML updates from Richard Weinberger: - removal of old and dead code - a bug fix for our tty driver - other minor cleanups across the code base * 'for-linus-4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml: um: Make line/tty semantics use true write IRQ um: trap: fix spelling mistake, EACCESS -> EACCES um: Don't hardcode path as it is architecture dependent um: NULL check before kfree is not needed um: remove unused AIO code um: Give start_idle_thread() a return code um: Remove update_debugregs() um: Drop own definition of PTRACE_SYSEMU/_SINGLESTEP
Diffstat (limited to 'arch/um/drivers/vector_kern.c')
-rw-r--r--arch/um/drivers/vector_kern.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/arch/um/drivers/vector_kern.c b/arch/um/drivers/vector_kern.c
index 10d8d20eb9ec..046fa9ea0ccc 100644
--- a/arch/um/drivers/vector_kern.c
+++ b/arch/um/drivers/vector_kern.c
@@ -1118,16 +1118,11 @@ static int vector_net_close(struct net_device *dev)
os_close_file(vp->fds->tx_fd);
vp->fds->tx_fd = -1;
}
- if (vp->bpf != NULL)
- kfree(vp->bpf);
- if (vp->fds->remote_addr != NULL)
- kfree(vp->fds->remote_addr);
- if (vp->transport_data != NULL)
- kfree(vp->transport_data);
- if (vp->header_rxbuffer != NULL)
- kfree(vp->header_rxbuffer);
- if (vp->header_txbuffer != NULL)
- kfree(vp->header_txbuffer);
+ kfree(vp->bpf);
+ kfree(vp->fds->remote_addr);
+ kfree(vp->transport_data);
+ kfree(vp->header_rxbuffer);
+ kfree(vp->header_txbuffer);
if (vp->rx_queue != NULL)
destroy_queue(vp->rx_queue);
if (vp->tx_queue != NULL)