From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Stone Subject: Re: [RFC] component: Fix: Unassign components' masters if bringing up master fails Date: Mon, 15 Feb 2016 16:36:02 +0000 Message-ID: References: <1455183351-22823-1-git-send-email-architt@codeaurora.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from mail-wm0-f53.google.com ([74.125.82.53]:33911 "EHLO mail-wm0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751096AbcBOQgE (ORCPT ); Mon, 15 Feb 2016 11:36:04 -0500 Received: by mail-wm0-f53.google.com with SMTP id b205so74786467wmb.1 for ; Mon, 15 Feb 2016 08:36:03 -0800 (PST) In-Reply-To: <1455183351-22823-1-git-send-email-architt@codeaurora.org> Sender: linux-arm-msm-owner@vger.kernel.org List-Id: linux-arm-msm@vger.kernel.org To: Archit Taneja Cc: Russell King - ARM Linux , linux-arm-msm@vger.kernel.org, Linux Kernel Mailing List , Jon Medhurst Hi Archit, On 11 February 2016 at 09:35, Archit Taneja wrote: > component_master_add_with_match can fail if the master's bind op doesn't > go through successfully. In such a scenario, all the components in the > master's match array have their 'master' pointer set to the given master. > These pointers need to be set to NULL again. If they aren't, successive > calls to component_master_add_with_match will fail because the driver > thinks these components already have a master. > > This issue can be seen when a driver defers probe because of missing > resources. It is seen after the introduction of commit: > > "component: track components via array rather than list" > > Add 'master_remove_components' which sets the all the components's masters > in the match array to NULL. This function is also re-used in > component_master_del and replaces code that did the same thing. Jon already fixed this (in a slightly more limited way perhaps?) in 57480484f9. Cheers, Daniel