From: Himanshu Jha <himanshujha199640@gmail.com>
To: Jiecheng Wu <jasonwood2031@gmail.com>
Cc: linux-iio@vger.kernel.org
Subject: Re: [PATCH] hmc5843_i2c.c: fix missing return value check of devm_regmap_init_i2c()
Date: Sun, 19 Aug 2018 14:21:42 +0530 [thread overview]
Message-ID: <20180819085142.GA2133@himanshu-Vostro-3559> (raw)
In-Reply-To: <20180819021641.3068-1-jasonwood2031@gmail.com>
On Sun, Aug 19, 2018 at 10:16:41AM +0800, Jiecheng Wu wrote:
> Function hmc5843_i2c_probe() defined in
> drivers/iio/magnetometer/hmc5843_i2c.c calls devm_regmap_init_i2c()
> to initialise managed register map. As the return value of
> devm_regmap_init_i2c() will be an ERR_PTR() on error, the return
> value must be checked against NULL.
Please take a careful look again at what points I suggested
in a previous patch you sent.
Take a look at a sample patch:
https://lore.kernel.org/lkml/20180531112107.13778-1-hdegoede@redhat.com/
* Signed-off-by:
* Bugzilla link:
* Send to relevant maintainers:
himanshu@himanshu-Vostro-3559:~/linux-next$ ./scripts/get_maintainer.pl ~/Downloads/hmc5843_i2c.c-fix-missing-return-value-check-of-devm_regmap_init_i2c.patch
Jonathan Cameron <jic23@kernel.org> (maintainer:IIO SUBSYSTEM AND DRIVERS)
Hartmut Knaack <knaack.h@gmx.de> (reviewer:IIO SUBSYSTEM AND DRIVERS)
Lars-Peter Clausen <lars@metafoo.de> (reviewer:IIO SUBSYSTEM AND DRIVERS)
Peter Meerwald-Stadler <pmeerw@pmeerw.net> (reviewer:IIO SUBSYSTEM AND DRIVERS)
linux-iio@vger.kernel.org (open list:IIO SUBSYSTEM AND DRIVERS)
linux-kernel@vger.kernel.org (open list)
* cc stable
* Fixes tag: -- would be helpful
* correct version numbering with changelog below the '---' (v1->v2->3 ...)
All these are documented here:
https://www.kernel.org/doc/html/latest/process/submitting-patches.html
> ---
> drivers/iio/magnetometer/hmc5843_i2c.c | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/iio/magnetometer/hmc5843_i2c.c b/drivers/iio/magnetometer/hmc5843_i2c.c
> index 3de7f44..4911cf8 100644
> --- a/drivers/iio/magnetometer/hmc5843_i2c.c
> +++ b/drivers/iio/magnetometer/hmc5843_i2c.c
> @@ -14,6 +14,7 @@
> #include <linux/regmap.h>
> #include <linux/iio/iio.h>
> #include <linux/iio/triggered_buffer.h>
> +#include <linux/device.h>
This include is not required since #include <linux/iio/iio.h>
already includes it.
--
Himanshu Jha
Undergraduate Student
Department of Electronics & Communication
Guru Tegh Bahadur Institute of Technology
next prev parent reply other threads:[~2018-08-19 12:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-19 2:16 [PATCH] hmc5843_i2c.c: fix missing return value check of devm_regmap_init_i2c() Jiecheng Wu
2018-08-19 8:51 ` Himanshu Jha [this message]
2018-08-19 11:12 ` Jonathan Cameron
-- strict thread matches above, loose matches on Subject: below --
2018-08-18 2:08 Jiecheng Wu
2018-08-18 11:37 ` Himanshu Jha
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=20180819085142.GA2133@himanshu-Vostro-3559 \
--to=himanshujha199640@gmail.com \
--cc=jasonwood2031@gmail.com \
--cc=linux-iio@vger.kernel.org \
/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