lkml.org 
[lkml]   [2019]   [Jan]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 3/3] net: dsa: lantiq_gswip: drop bogus drvdata check
    Date
    The platform-device driver data is set on successful probe and will
    never be NULL on remove (or we have much bigger problems).

    Signed-off-by: Johan Hovold <johan@kernel.org>
    ---
    drivers/net/dsa/lantiq_gswip.c | 3 ---
    1 file changed, 3 deletions(-)

    diff --git a/drivers/net/dsa/lantiq_gswip.c b/drivers/net/dsa/lantiq_gswip.c
    index 5792674dd4e4..27d092cab40e 100644
    --- a/drivers/net/dsa/lantiq_gswip.c
    +++ b/drivers/net/dsa/lantiq_gswip.c
    @@ -1126,9 +1126,6 @@ static int gswip_remove(struct platform_device *pdev)
    struct gswip_priv *priv = platform_get_drvdata(pdev);
    int i;

    - if (!priv)
    - return 0;
    -
    /* disable the switch */
    gswip_mdio_mask(priv, GSWIP_MDIO_GLOB_ENABLE, 0, GSWIP_MDIO_GLOB);

    --
    2.20.1
    \
     
     \ /
      Last update: 2019-01-16 11:25    [W:4.119 / U:0.012 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site