Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3329072imm; Mon, 4 Jun 2018 01:29:05 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLIhS/6jGeWyhWdTyupd6eQe5aVOZfJrZeXyNiMCCDIZp/wLyNx7RGq3qFo86LYcg/3f2Dc X-Received: by 2002:a17:902:780a:: with SMTP id p10-v6mr21079863pll.281.1528100945018; Mon, 04 Jun 2018 01:29:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528100944; cv=none; d=google.com; s=arc-20160816; b=GcpkTz7wes7V+/+iX7+j3TXpbqw3XxYrZmaz14c5frqAbjpq9qno+yacRho/4bo46h xI5GNGDxxg5PfvteEKUs1H0Zw5/AFQHiyCj3Ij/hUsl/8krjHmRymk9EvqHRBVDtPO8S FgTxWMSRaWt39EHVPh/CAfwxuCyGw7ZEOStXsuJ0ZCSFn6cygY/Pov1iHggniyupY9AJ 1lMHjgGUqPJ7mZ3/s9IS8oKwNmUeGgYa2ZhgE+qMev4d2RdeXO6t2NmW/VjBuYcfV78d dr/Evbrgk35CFBIO+U2tW/TamrqCN+BZUiSpbSN1peXZXcIeLGmNeRnppKuvbOdJiveX Ih8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:arc-authentication-results; bh=yiKtuWMiDqRKoX7PIpW9rKvn2SMsYYuIF1w7MAML1CI=; b=ybMyMg7Q8UqZhVF3qLaMOzIR/oJgMMTOtuuw4f9IQttJ8QoYo2aOT3reeYXLtwZXx+ qDBkG4TvjCgbPe3joFXD5AAuhObg/Jsz6v7vkdQVDJanYszwsba6E6D0+9xC9OB+8q8J nQCj8n3jG1+0blZkYWNbIMqVbyozdrv/L0ZP5XRMefNAVOh7DrPW6Ii1Ojy7MgkBDo2g ux92DK3w/KelNkgevdNIOadEdSVqM3VEGp6qBzioucHXWPlZHFoOto5FvmbDxqITSvyq MiTF9klWUc/YgholKdKRf766eh5ip+sGsQDdf1NWYmFW2Y3GUZOhV5pebfJLyN5rvmZw fG0w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s9-v6si128294plr.332.2018.06.04.01.28.49; Mon, 04 Jun 2018 01:29:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751918AbeFDI2Y (ORCPT + 99 others); Mon, 4 Jun 2018 04:28:24 -0400 Received: from mail-lf0-f68.google.com ([209.85.215.68]:38330 "EHLO mail-lf0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751715AbeFDI2X (ORCPT ); Mon, 4 Jun 2018 04:28:23 -0400 Received: by mail-lf0-f68.google.com with SMTP id i83-v6so11661733lfh.5; Mon, 04 Jun 2018 01:28:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=yiKtuWMiDqRKoX7PIpW9rKvn2SMsYYuIF1w7MAML1CI=; b=oSIpxCKuKzIc2KulukS64+wTHnW/ASQr66AJUQ46oBH1VC8leWLwpX0jH0Z/OjoWTV jGdCLIIQ5d/QyFWVWLje6t6uGFSSGSJBzHRDAEBs26r3x+5Waw5vZq6jylxTLJEf5MQW XmqTfPNI1kRs+wVUK1jAWpGJnkF4Xcu/zZmADToAdCBIky2xDFgOZawYG5FYUFjAgo42 CMXHLHrcC3WOZ1tHywqfRrjdgsTpL+63FW1Wokvnl1xfzs9eKm5OC6TWvJNGkmJ+LGv+ fxyZO3qUcmcBy9q/mSNTVRN5IW6nz3OLRwDwmz3bXJWyPDsz3BEnTMXq9Z7puFn6r38z 2adw== X-Gm-Message-State: APt69E0e76djWiCmftEmRwzm8vHJADsS79Os4yyJNkRNUqcmY8UbLLN9 E4CH3y9NK8N/1LOQ54T4EidINU8T X-Received: by 2002:a2e:2408:: with SMTP id k8-v6mr5518146ljk.95.1528100901034; Mon, 04 Jun 2018 01:28:21 -0700 (PDT) Received: from mail-lf0-f44.google.com (mail-lf0-f44.google.com. [209.85.215.44]) by smtp.gmail.com with ESMTPSA id u3-v6sm628793ljg.84.2018.06.04.01.28.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Jun 2018 01:28:20 -0700 (PDT) Received: by mail-lf0-f44.google.com with SMTP id r2-v6so23806560lff.4; Mon, 04 Jun 2018 01:28:20 -0700 (PDT) X-Received: by 2002:a19:c608:: with SMTP id w8-v6mr10781597lff.64.1528100900578; Mon, 04 Jun 2018 01:28:20 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a2e:9783:0:0:0:0:0 with HTTP; Mon, 4 Jun 2018 01:28:20 -0700 (PDT) In-Reply-To: <20180602101155.26375-1-marek.vasut+renesas@gmail.com> References: <20180602101155.26375-1-marek.vasut+renesas@gmail.com> From: Vaishali Thakkar Date: Mon, 4 Jun 2018 13:58:20 +0530 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3 01/10] mfd: da9063: Fix failpath in core To: Marek Vasut Cc: Linux Kernel Mailing List , Marek Vasut , Geert Uytterhoeven , Lee Jones , Mark Brown , Steve Twiss , Wolfram Sang , linux-renesas-soc@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jun 2, 2018 at 3:41 PM, Marek Vasut wrote: > In case mfd_add_devices() fails, da9063_irq_exit() is not called to > undo the IRQchip setup done by da9063_irq_init(). Fix this by adding > the missing fail path. > > Signed-off-by: Marek Vasut Reviewed by: Vaishali Thakkar > Cc: Geert Uytterhoeven > Cc: Lee Jones > Cc: Mark Brown > Cc: Steve Twiss > Cc: Wolfram Sang > Cc: linux-renesas-soc@vger.kernel.org > --- > V3: New patch > --- > drivers/mfd/da9063-core.c | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > diff --git a/drivers/mfd/da9063-core.c b/drivers/mfd/da9063-core.c > index 6c2870d4e754..8226ebd8b96d 100644 > --- a/drivers/mfd/da9063-core.c > +++ b/drivers/mfd/da9063-core.c > @@ -229,10 +229,16 @@ int da9063_device_init(struct da9063 *da9063, unsigned int irq) > ret = mfd_add_devices(da9063->dev, -1, da9063_devs, > ARRAY_SIZE(da9063_devs), NULL, da9063->irq_base, > NULL); > - if (ret) > + if (ret) { > dev_err(da9063->dev, "Cannot add MFD cells\n"); > + goto err_irq_exit; > + } > > return ret; > + > +err_irq_exit: > + da9063_irq_exit(da9063); > + return ret; > } > > void da9063_device_exit(struct da9063 *da9063) > -- > 2.16.2 >