1. 27 9月, 2016 4 次提交
  2. 23 9月, 2016 6 次提交
  3. 19 9月, 2016 25 次提交
  4. 17 9月, 2016 5 次提交
    • C
      mwifiex: fix null pointer deference when adapter is null · 80ba4f1d
      Colin Ian King 提交于
      If adapter is null the error exit path in mwifiex_shutdown_sw is
      to down the semaphore sem and print some debug via mwifiex_dbg.
      However, passing a NULL adapter to mwifiex_dbg causes a null
      pointer deference when accessing adapter->dev.  This fix checks
      for a null adapter at the start of the function and to exit
      without the need to up the semaphore and we also skip the debug
      to avoid the null pointer dereference.
      Signed-off-by: NColin Ian King <colin.king@canonical.com>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      80ba4f1d
    • B
      mwifiex: fix error handling in mwifiex_create_custom_regdomain · 92ca4f92
      Bob Copeland 提交于
      smatch reports:
      
      sta_cmdresp.c:1053 mwifiex_create_custom_regdomain() warn: possible memory leak of 'regd'
      
      Indeed, mwifiex_create_custom_regdomain() returns NULL in the
      case that channel is missing in the TLV without freeing regd.
      
      Moreover, some other error paths in this function return ERR_PTR
      values which are assigned without checking to the regd field in
      the mwifiex_adapter struct.  The latter is only null-checked where
      used.
      
      Fix by freeing regd in the error path, and only update
      priv->adapter->regd if the returned pointer is valid.
      
      Cc: Amitkumar Karwar <akarwar@marvell.com>
      Cc: Nishant Sarmukadam <nishants@marvell.com>
      Signed-off-by: NBob Copeland <me@bobcopeland.com>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      92ca4f92
    • J
      rtl8xxxu: Implement 8192e specific power down sequence · f1785fbf
      Jes Sorensen 提交于
      This powers down the 8192e correctly, or at least to the point where
      the firmware will load again, when reloading the driver module.
      Signed-off-by: NJes Sorensen <Jes.Sorensen@redhat.com>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      f1785fbf
    • J
      dwc_eth_qos: constify net_device_ops structures · 37307504
      Julia Lawall 提交于
      Check for net_device_ops structures that are only stored in the netdev_ops
      field of a net_device structure.  This field is declared const, so
      net_device_ops structures that have this property can be declared as const
      also.
      
      The semantic patch that makes this change is as follows:
      (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @r disable optional_qualifier@
      identifier i;
      position p;
      @@
      static struct net_device_ops i@p = { ... };
      
      @ok@
      identifier r.i;
      struct net_device e;
      position p;
      @@
      e.netdev_ops = &i@p;
      
      @bad@
      position p != {r.p,ok.p};
      identifier r.i;
      struct net_device_ops e;
      @@
      e@i@p
      
      @depends on !bad disable optional_qualifier@
      identifier r.i;
      @@
      static
      +const
       struct net_device_ops i = { ... };
      // </smpl>
      
      The result of size on this file before the change is:
         text	      data     bss     dec         hex	  filename
        21623       1316      40   22979        59c3
         drivers/net/ethernet/synopsys/dwc_eth_qos.o
      
      and after the change it is:
         text	     data        bss	    dec	    hex	filename
        22199       724         40      22963    59b3
         drivers/net/ethernet/synopsys/dwc_eth_qos.o
      Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      37307504
    • J
      hisilicon: constify net_device_ops structures · 66f58ec4
      Julia Lawall 提交于
      Check for net_device_ops structures that are only stored in the netdev_ops
      field of a net_device structure.  This field is declared const, so
      net_device_ops structures that have this property can be declared as const
      also.
      
      The semantic patch that makes this change is as follows:
      (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @r disable optional_qualifier@
      identifier i;
      position p;
      @@
      static struct net_device_ops i@p = { ... };
      
      @ok@
      identifier r.i;
      struct net_device e;
      position p;
      @@
      e.netdev_ops = &i@p;
      
      @bad@
      position p != {r.p,ok.p};
      identifier r.i;
      struct net_device_ops e;
      @@
      e@i@p
      
      @depends on !bad disable optional_qualifier@
      identifier r.i;
      @@
      static
      +const
       struct net_device_ops i = { ... };
      // </smpl>
      
      The result of size on this file before the change is:
      
         text	      data     bss     dec         hex	  filename
         7995	       848       8    8851        2293
         drivers/net/ethernet/hisilicon/hip04_eth.o
      
      and after the change it is:
      
         text	     data        bss	    dec	    hex	filename
         8571	      256          8       8835    2283
         drivers/net/ethernet/hisilicon/hip04_eth.o
      Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      66f58ec4