Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp909759imm; Fri, 11 May 2018 08:11:35 -0700 (PDT) X-Google-Smtp-Source: AB8JxZruBqM4gEfvOEU1J4RFiV1tcYmfxckWpBm3AqkWZZuciChfzS3yEnPP7+0mGkZERXhpe11d X-Received: by 2002:a62:dc8a:: with SMTP id c10-v6mr5931073pfl.183.1526051495595; Fri, 11 May 2018 08:11:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526051495; cv=none; d=google.com; s=arc-20160816; b=l9IGImYtBq3r+zozhJTvlBAWK7RG3m4CR99xIRXkCh0+eI0iNCP2UBrsqW15mJ9lja ABTMz2UyOEFrPvr5GESYuDDFMhuouIqujGXhrqC2GjpzqbT1UMBCGACPa1TM8AvD7YMv k2e7BHRi24X1ggeOKdNuSa09SRA37u3zCzfOIPs2/Ys9h86Pq6jWwynlax/7UEXKl3PR b7nSVgKzajVRU/Gca/woqYupFFr5rGtjIh3L3gv4CBfT0rsknLzGQBIj+LR7yOJPsnIO 8paJHZeUWPdP6Fv0a9w0o4AqfXGa1Hn8eA71vgaFGULDltZQAgKsnXJcZd6hmHpT6P68 8uiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date :arc-authentication-results; bh=AcSWmsoOUU/E+Kw3bR/rRTqR6GEpWgoc7oyBDq9h5QM=; b=ETsKrvdf4Lkl/kliNEPEhuXSjocUkLJUwksWeBI+yfysAw1xNzYebuklhYmxw7MVLg y87Q556AF6yAvuAIGppEFdNob3qadWYB8L1rhNgDbiM+JeBXvaZOhQBjRpkkzj23KUov I0R46CI7bnWa1SKq/9Ty0xD2gXN79VMaroi01Y/CVuYSVDwAOwdSreULMgmgIsQ/P/E/ QxpAyYHca+9s1V/Akvx6prVaMBlgk12V8Fk/E+hTuTx6YrNon0SXMPvvchkzukNzN0Xh eLKWJvyfLz2BOzDJmN3ftZLHP61Wry7RRF2zzi8Dez6zKviHPLymTpwof+V/KTINB9H7 vzNw== 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 v12-v6si3722315plg.180.2018.05.11.08.11.21; Fri, 11 May 2018 08:11:35 -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 S1753413AbeEKPKB (ORCPT + 99 others); Fri, 11 May 2018 11:10:01 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:19473 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753120AbeEKPKA (ORCPT ); Fri, 11 May 2018 11:10:00 -0400 X-IronPort-AV: E=Sophos;i="5.49,389,1520895600"; d="scan'208";a="326529934" Received: from client-eduroam780.canalip.upmc.fr ([134.157.123.15]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 May 2018 17:09:58 +0200 Date: Fri, 11 May 2018 17:09:58 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@hadrien To: Christophe JAILLET cc: alan@linux.intel.com, sakari.ailus@linux.intel.com, mchehab@kernel.org, gregkh@linuxfoundation.org, andriy.shevchenko@linux.intel.com, chen.chenchacha@foxmail.com, keescook@chromium.org, arvind.yadav.cs@gmail.com, linux-media@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: Re: [PATCH 2/3] media: staging: atomisp: Fix an error handling path in 'lm3554_probe()' In-Reply-To: Message-ID: References: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 11 May 2018, Christophe JAILLET wrote: > The use of 'fail1' and 'fail2' is not correct. Reorder these calls to > branch at the right place of the error handling path. Maybe it would be good to improve the names at the same time? julia > > Signed-off-by: Christophe JAILLET > --- > drivers/staging/media/atomisp/i2c/atomisp-lm3554.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/drivers/staging/media/atomisp/i2c/atomisp-lm3554.c b/drivers/staging/media/atomisp/i2c/atomisp-lm3554.c > index 723fa74ff815..1e5f516f6e50 100644 > --- a/drivers/staging/media/atomisp/i2c/atomisp-lm3554.c > +++ b/drivers/staging/media/atomisp/i2c/atomisp-lm3554.c > @@ -871,7 +871,7 @@ static int lm3554_probe(struct i2c_client *client) > ARRAY_SIZE(lm3554_controls)); > if (err) { > dev_err(&client->dev, "error initialize a ctrl_handler.\n"); > - goto fail2; > + goto fail1; > } > > for (i = 0; i < ARRAY_SIZE(lm3554_controls); i++) > @@ -879,7 +879,6 @@ static int lm3554_probe(struct i2c_client *client) > NULL); > > if (flash->ctrl_handler.error) { > - > dev_err(&client->dev, "ctrl_handler error.\n"); > goto fail2; > } > @@ -888,7 +887,7 @@ static int lm3554_probe(struct i2c_client *client) > err = media_entity_pads_init(&flash->sd.entity, 0, NULL); > if (err) { > dev_err(&client->dev, "error initialize a media entity.\n"); > - goto fail1; > + goto fail2; > } > > flash->sd.entity.function = MEDIA_ENT_F_FLASH; > -- > 2.17.0 > > -- > To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html >