1. 01 Jul, 2014 1 commit
    • Johan Hovold's avatar
      Revert "net: eth: cpsw: Correctly attach to GPIO bitbang MDIO driver" · acdad30d
      Johan Hovold authored
      commit 59993f48 upstream.
      
      This reverts commit f8d56d8f ("net:
       eth: cpsw: Correctly attach to GPIO bitbang MDIO driver").
      
      Fix potential null-pointer dereference at probe if the mdio-gpio device
      has not been successfully probed yet.
      
      The offending commit is plain wrong for a number of reasons. First of
      all it accesses internal driver data of an unrelated device. Neither
      does it check that the data is non-null (which it is in case the device
      has not been probed yet).
      
      Furthermore, the decision on whether to treat any driver data according
      to the mdio-gpio driver's internals is made based on the node name. But
      the name is not compared against "mdio" which is the normal name for the
      node, but rather against "gpio" which the node does not have to be named
      (and shouldn't be according to the binding documentation). [ If this
      hack is to be kept out-of-tree it should at least be matching against
      the compatible property. ]
      
      Cc: Stefan Roese <sr@denx.de>
      Signed-off-by: default avatarJohan Hovold <jhovold@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      acdad30d
  2. 26 Jun, 2014 39 commits