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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7C897C54EBC for ; Thu, 12 Jan 2023 12:52:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231379AbjALMwm (ORCPT ); Thu, 12 Jan 2023 07:52:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230496AbjALMwd (ORCPT ); Thu, 12 Jan 2023 07:52:33 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C83604EC8E; Thu, 12 Jan 2023 04:52:32 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 687AA60AC3; Thu, 12 Jan 2023 12:52:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6C37FC433EF; Thu, 12 Jan 2023 12:52:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1673527951; bh=y28Fp8xoZWZVm5zKdmGi0Ihx0GiHsk0YCVX29bnybjg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=gVVZ+BYzKXdi+W4nuI6DYf7ZadoindJpejIWncosE+Uv+CPmFi5+p6P2bQP1Nl3Bb 2tXnG3n5M1l1gA5q/gZVIU+fVW2wJYsHZ1YHOPXWwHs74HxXND3vKqWVjQ5UJYQVpS /lNsf/k9GJCUiMVgE8KcxzSGLIfeTYispfrTv4Zs= Date: Thu, 12 Jan 2023 13:52:28 +0100 From: Greg Kroah-Hartman To: "Isaac J. Manjarres" Cc: "Rafael J. Wysocki" , Marek Szyprowski , Tomeu Vizoso , Russell King , Ulf Hansson , stable@vger.kernel.org, Saravana Kannan , kernel-team@android.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH stable-4.14] driver core: Fix bus_type.match() error handling in __driver_attach() Message-ID: References: <20230110021536.1347134-1-isaacmanjarres@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230110021536.1347134-1-isaacmanjarres@google.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 09, 2023 at 06:15:36PM -0800, Isaac J. Manjarres wrote: > commit 27c0d217340e47ec995557f61423ef415afba987 upstream. > > When a driver registers with a bus, it will attempt to match with every > device on the bus through the __driver_attach() function. Currently, if > the bus_type.match() function encounters an error that is not > -EPROBE_DEFER, __driver_attach() will return a negative error code, which > causes the driver registration logic to stop trying to match with the > remaining devices on the bus. > > This behavior is not correct; a failure while matching a driver to a > device does not mean that the driver won't be able to match and bind > with other devices on the bus. Update the logic in __driver_attach() > to reflect this. > > Fixes: 656b8035b0ee ("ARM: 8524/1: driver cohandle -EPROBE_DEFER from bus_type.match()") > Cc: stable@vger.kernel.org > Cc: Saravana Kannan > Signed-off-by: Isaac J. Manjarres > --- > drivers/base/dd.c | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) All now queued up, thanks. greg k-h