Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp905313imm; Fri, 11 May 2018 08:08:11 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpc/7aL4Qfth3iK5HYnfiloJKxGi0yQhn3WM8kBZg/BDhONLSfr2t+MCEQddRAAV5sLcCt/ X-Received: by 2002:a62:fd12:: with SMTP id p18-v6mr5867915pfh.152.1526051291845; Fri, 11 May 2018 08:08:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526051291; cv=none; d=google.com; s=arc-20160816; b=o8Vbo2VaJmGTDllaS4GH/kRvNkX4REUE2IaiThNp2N99cqWWLi1R9IRAdXplq4Dkfm WUeJFcODrY3nt1GT06nBmouX1kooysLbEY7McxuBlMLJkMFEV3YAdVnj7P5gUZ2CqQg5 dPnuIAEq5/yaJXIWTO5gMiW3PsrWtgdXSlcDWPCe1u/Ckper9LWuD00kZ+ucPFSxjNNs dz62Wc1cnBzl85WtSja4Z8NvK7yxBEhzrx8FRQ5L9RQkFXr9SElR1pxBArN8PkJV5AMl xizW5GfhIaSZ72cELspZznp7CBs2O4CgtOsVC4PSuFtyEGZ5ZrkhnBr9PHMCtjRienFZ dbKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=hZEDOSf0XQC9uCBLa4xWLbKlS2OxxXw2SRE1CcGuzH0=; b=N11/hC2rXxz/SSF/25KItlhXafvIh2DxAOOMeF+QlHqPsVrFb8rn6MHkQSWuNs306Y T0a6UIScehP3QQG/JzU0xB1pOzUJzFESGaPOuqeb6bHO5zOs4Wp6EVtFvhSAf7HtT0XK jEX4wdnVKI6dYXhHG921KsSsOho7O5DVh72K5nscWkoLaUYIZh20JmoNFbb1KXbUr9O1 hEQAc7XNc47Z35CBlNsbTePq7LYyfLGxDM7GCguv8JyevWVw8WGpLeRy5hsSSC6FO8+h G54CqfaV4Yi9qzxfKfAq8UXmTo9CYvgoSohCAVNFV8zY+wGU29y3bigQiECjPnvm7xYM v2Aw== 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 b7-v6si2781255pgu.482.2018.05.11.08.07.56; Fri, 11 May 2018 08:08:11 -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 S1753566AbeEKPHM (ORCPT + 99 others); Fri, 11 May 2018 11:07:12 -0400 Received: from smtp01.smtpout.orange.fr ([80.12.242.123]:23007 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753346AbeEKPGj (ORCPT ); Fri, 11 May 2018 11:06:39 -0400 Received: from ubuntu-CJ.home ([86.244.116.1]) by mwinf5d36 with ME id l36B1x00C01t9Ri0336dbc; Fri, 11 May 2018 17:06:37 +0200 X-ME-Helo: ubuntu-CJ.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Fri, 11 May 2018 17:06:37 +0200 X-ME-IP: 86.244.116.1 From: Christophe JAILLET To: 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 Cc: linux-media@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH 2/3] media: staging: atomisp: Fix an error handling path in 'lm3554_probe()' Date: Fri, 11 May 2018 17:06:17 +0200 Message-Id: X-Mailer: git-send-email 2.17.0 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The use of 'fail1' and 'fail2' is not correct. Reorder these calls to branch at the right place of the error handling path. 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