projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d113412
)
net: irda: avoid null pointer dereference
author
xypron.glpk@gmx.de
<xypron.glpk@gmx.de>
Tue, 17 May 2016 22:06:02 +0000
(
00:06
+0200)
committer
David S. Miller
<davem@davemloft.net>
Thu, 19 May 2016 18:30:57 +0000
(11:30 -0700)
Only dereference variable self after checking it is not NULL.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/irda/nsc-ircc.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/net/irda/nsc-ircc.c
b/drivers/net/irda/nsc-ircc.c
index 9ef13d8ed813f243511c9a11993dc73f7989b075..aaecc3baaf309ed54683d9b5e93511400d5acff3 100644
(file)
--- a/
drivers/net/irda/nsc-ircc.c
+++ b/
drivers/net/irda/nsc-ircc.c
@@
-1253,7
+1253,7
@@
static void nsc_ircc_change_dongle_speed(int iobase, int speed, int dongle_id)
*/
static __u8 nsc_ircc_change_speed(struct nsc_ircc_cb *self, __u32 speed)
{
- struct net_device *dev
= self->netdev
;
+ struct net_device *dev;
__u8 mcr = MCR_SIR;
int iobase;
__u8 bank;
@@
-1263,6
+1263,7
@@
static __u8 nsc_ircc_change_speed(struct nsc_ircc_cb *self, __u32 speed)
IRDA_ASSERT(self != NULL, return 0;);
+ dev = self->netdev;
iobase = self->io.fir_base;
/* Update accounting for new speed */