From: Dan Carpenter <dan.carpenter@oracle.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
kernel-janitors@vger.kernel.org
Cc: Alan Cox <alan@linux.intel.com>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
linux-media@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
devel@driverdev.osuosl.org, Kristian Beilke <beilke@posteo.de>
Subject: Re: [PATCH v1 05/10] staging: atomisp: Remove non-ACPI leftovers
Date: Wed, 20 Dec 2017 05:38:29 +0000 [thread overview]
Message-ID: <20171220053828.5wphhl6oc2sl3su5@mwanda> (raw)
In-Reply-To: <20171219205957.10933-5-andriy.shevchenko@linux.intel.com>
On Tue, Dec 19, 2017 at 10:59:52PM +0200, Andy Shevchenko wrote:
> @@ -914,9 +904,7 @@ static int lm3554_probe(struct i2c_client *client)
> dev_err(&client->dev, "gpio request/direction_output fail");
> goto fail2;
> }
> - if (ACPI_HANDLE(&client->dev))
> - err = atomisp_register_i2c_module(&flash->sd, NULL, LED_FLASH);
> - return 0;
> + return atomisp_register_i2c_module(&flash->sd, NULL, LED_FLASH);
> fail2:
> media_entity_cleanup(&flash->sd.entity);
> v4l2_ctrl_handler_free(&flash->ctrl_handler);
Actually every place where we directly return a function call is wrong
and needs error handling added. I've been meaning to write a Smatch
check for this because it's a common anti-pattern we don't check the
last function call for errors.
Someone could probably do the same in Coccinelle if they want.
regards,
dan carpenter
next parent reply other threads:[~2017-12-20 5:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20171219205957.10933-1-andriy.shevchenko@linux.intel.com>
[not found] ` <20171219205957.10933-5-andriy.shevchenko@linux.intel.com>
2017-12-20 5:38 ` Dan Carpenter [this message]
2017-12-20 10:30 ` [PATCH v1 05/10] staging: atomisp: Remove non-ACPI leftovers Julia Lawall
2018-01-02 10:26 ` Dan Carpenter
2018-01-02 10:36 ` Julia Lawall
2017-12-20 12:27 ` walter harms
2017-12-20 12:36 ` Julia Lawall
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=20171220053828.5wphhl6oc2sl3su5@mwanda \
--to=dan.carpenter@oracle.com \
--cc=alan@linux.intel.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=beilke@posteo.de \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-media@vger.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: link
Be 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