LKML Archive on lore.kernel.org help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@lip6.fr> To: Christophe JAILLET <christophe.jaillet@wanadoo.fr> 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()' Date: Fri, 11 May 2018 17:09:58 +0200 (CEST) [thread overview] Message-ID: <alpine.DEB.2.20.1805111709390.20118@hadrien> (raw) In-Reply-To: <f762630a681c08d9903cf73243dd98416ae96a7c.1526048313.git.christophe.jaillet@wanadoo.fr> 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 <christophe.jaillet@wanadoo.fr> > --- > 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 >
next prev parent reply other threads:[~2018-05-11 15:09 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-05-11 15:06 [PATCH 0/3] media: staging: atomisp: Christophe JAILLET 2018-05-11 15:06 ` [PATCH 1/3] media: staging: atomisp: Return an error code in case of error in 'lm3554_probe()' Christophe JAILLET 2018-05-11 15:06 ` [PATCH 2/3] media: staging: atomisp: Fix an error handling path " Christophe JAILLET 2018-05-11 15:09 ` Julia Lawall [this message] 2018-05-11 15:31 ` Alan Cox 2018-05-11 15:06 ` [PATCH 3/3] media: staging: atomisp: Fix usage of 'media_entity_cleanup()' Christophe JAILLET
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=alpine.DEB.2.20.1805111709390.20118@hadrien \ --to=julia.lawall@lip6.fr \ --cc=alan@linux.intel.com \ --cc=andriy.shevchenko@linux.intel.com \ --cc=arvind.yadav.cs@gmail.com \ --cc=chen.chenchacha@foxmail.com \ --cc=christophe.jaillet@wanadoo.fr \ --cc=devel@driverdev.osuosl.org \ --cc=gregkh@linuxfoundation.org \ --cc=keescook@chromium.org \ --cc=kernel-janitors@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-media@vger.kernel.org \ --cc=mchehab@kernel.org \ --cc=sakari.ailus@linux.intel.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).