]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: check master device before put
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>
Tue, 24 Oct 2017 20:37:19 +0000 (16:37 -0400)
committerDavid S. Miller <davem@davemloft.net>
Wed, 25 Oct 2017 01:49:14 +0000 (10:49 +0900)
commit3eb8feeb1708c7dbfd2e97df92a2a407c116606e
tree0c922fe5e47208525173a35c91f2743385df3780
parent829385f08ae99740276cbd46c9db29764c519211
net: dsa: check master device before put

In the case of pdata, the dsa_cpu_parse function calls dev_put() before
making sure it isn't NULL. Fix this.

Fixes: 71e0bbde0d88 ("net: dsa: Add support for platform data")
Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dsa/dsa2.c