From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-21.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT,USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D16A7C4338F for ; Wed, 18 Aug 2021 03:38:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B6A6C60EBD for ; Wed, 18 Aug 2021 03:38:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236111AbhHRDin (ORCPT ); Tue, 17 Aug 2021 23:38:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38878 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236340AbhHRDim (ORCPT ); Tue, 17 Aug 2021 23:38:42 -0400 Received: from mail-yb1-xb49.google.com (mail-yb1-xb49.google.com [IPv6:2607:f8b0:4864:20::b49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 79915C0613C1 for ; Tue, 17 Aug 2021 20:38:08 -0700 (PDT) Received: by mail-yb1-xb49.google.com with SMTP id n20-20020a2540140000b0290593b8e64cd5so1474709yba.3 for ; Tue, 17 Aug 2021 20:38:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:message-id:mime-version:subject:from:to:cc; bh=ug2zcdMCaeHh0XAdi8LdoXsjv0peD2Al0CHXVkIyFY8=; b=IuWtNEvbDa2kpwWZYNZufkDH3pFlfMBnmV2plEsPX+lVFttpkpGqKCyO/xZB2wnrds 6wEc1MPmXYPK3s4rRR6KlAL9DiCQFCUb3x8xBsQmdoRDlQARWdB1ByrLFE67wb2xt6VP WSiB2iDjxxBOZ3kUnzweyTO7jeQV5oq4BZyrsGGY3RJneu0bNyf1VlhtD79puiBt029H g/PGEpSsTfka2jQ3l1aQC8L4ovpccysQglCUHEAusTuLJ6ziMuLtLnKSHbV9U8vGouzK paEKrl1apxdiScM3OZSe56Koc7gpQP1CslR710iZzLGRJ4pVBsliAGK6ieIIsSb0ZIyT 0NlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=ug2zcdMCaeHh0XAdi8LdoXsjv0peD2Al0CHXVkIyFY8=; b=klsEX1HW1lECaC1ndkg16yECS56nYLxRf+QhcqBaWVYpRye/uaiUmrdqtHljV7Gg7F XpzenMW8L8I9MSudDt76zSEzxTK++VKw4+h4hFVME556lrNDyZUPkJYOtE7y0TJTgdCx iIa+fBzh/QGEm02+c0W5mk5dV0bhENeb20Nxpv2FpKTTtOFBw32CI7k+MiEQraYoEsDS 3In5mUeHuhKhGxE1zV3mAjkNpa+1lNBS3crwbRAEUreDGRlmsfQXyfceEAQthb+8Wyxo ks2TsUS1TgEnV4LGYXgA31RN5M+0vtKcspRLvpwbhziWiY9bJcTa3JEU2umwUnOsMdne qp1g== X-Gm-Message-State: AOAM533tJPJ1qxymeEd+olQZa2+k1RY1sieWpW1ZU+5meXXZ9ExJ2vQs ctsTil5deYqX/4TynKkzWYWOvJF7GdKfQuQ= X-Google-Smtp-Source: ABdhPJwlv55rDjktIeu+22XottH9UI4zxlHdsPFmVybWBm49omkRuuXWyfT9pG7F4w0AsUzbyOEeNNSnYdbnAlc= X-Received: from saravanak.san.corp.google.com ([2620:15c:2d:3:7750:a56d:5272:72cb]) (user=saravanak job=sendgmr) by 2002:a25:d1c2:: with SMTP id i185mr8917811ybg.466.1629257887738; Tue, 17 Aug 2021 20:38:07 -0700 (PDT) Date: Tue, 17 Aug 2021 20:38:00 -0700 Message-Id: <20210818033804.3281057-1-saravanak@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.33.0.rc1.237.g0d66db33f3-goog Subject: [PATCH net v3 0/3] Clean up and fix error handling in mdio_mux_init() From: Saravana Kannan To: Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Jakub Kicinski , Jon Mason , David Daney Cc: Saravana Kannan , Marc Zyngier , Neil Armstrong , Kevin Hilman , kernel-team@android.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch series was started due to -EPROBE_DEFER not being handled correctly in mdio_mux_init() and causing issues [1]. While at it, I also did some more error handling fixes and clean ups. The -EPROBE_DEFER fix is the last patch. Ideally, in the last patch we'd treat any error similar to -EPROBE_DEFER but I'm not sure if it'll break any board/platforms where some child mdiobus never successfully registers. If we treated all errors similar to -EPROBE_DEFER, then none of the child mdiobus will work and that might be a regression. If people are sure this is not a real case, then I can fix up the last patch to always fail the entire mdio-mux init if any of the child mdiobus registration fails. Cc: Marc Zyngier Cc: Neil Armstrong Cc: Kevin Hilman [1] - https://lore.kernel.org/lkml/CAGETcx95kHrv8wA-O+-JtfH7H9biJEGJtijuPVN0V5dUKUAB3A@mail.gmail.com/#t v1 -> v2: - Added Acked-by, Tested-by and Reviewed-by - Fixing the subject so it goes to "net" tree v2 -> v3: - Added Fixes tag to all the patches Saravana Kannan (3): net: mdio-mux: Delete unnecessary devm_kfree net: mdio-mux: Don't ignore memory allocation errors net: mdio-mux: Handle -EPROBE_DEFER correctly drivers/net/mdio/mdio-mux.c | 37 ++++++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 13 deletions(-) -- 2.33.0.rc1.237.g0d66db33f3-goog