From: Jerome Brunet <jbrunet@baylibre.com>
To: Dan Carpenter <dan.carpenter@linaro.org>
Cc: oe-kbuild@lists.linux.dev,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Dave Ertman <david.m.ertman@intel.com>,
Ira Weiny <ira.weiny@intel.com>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Stephen Boyd <sboyd@kernel.org>, Arnd Bergmann <arnd@arndb.de>,
lkp@intel.com, oe-kbuild-all@lists.linux.dev,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 6/7] clk: clk-imx8mp-audiomix: use the auxiliary device creation helper
Date: Wed, 12 Feb 2025 11:16:56 +0100 [thread overview]
Message-ID: <1jldub1n8n.fsf@starbuckisacylon.baylibre.com> (raw)
In-Reply-To: <7bb0b7ea-8ca4-4ea1-a7ec-d56646240e59@stanley.mountain> (Dan Carpenter's message of "Wed, 12 Feb 2025 10:26:50 +0300")
On Wed 12 Feb 2025 at 10:26, Dan Carpenter <dan.carpenter@linaro.org> wrote:
> Hi Jerome,
>
> kernel test robot noticed the following build warnings:
>
> url:
> https://github.com/intel-lab-lkp/linux/commits/Jerome-Brunet/driver-core-auxiliary-bus-add-device-creation-helper/20250207-023433
> base: 2014c95afecee3e76ca4a56956a936e23283f05b
> patch link: https://lore.kernel.org/r/20250206-aux-device-create-helper-v2-6-fa6a0f326527%40baylibre.com
> patch subject: [PATCH v2 6/7] clk: clk-imx8mp-audiomix: use the auxiliary device creation helper
> config: xtensa-randconfig-r071-20250208
> (https://download.01.org/0day-ci/archive/20250208/202502081655.FlCrxpYN-lkp@intel.com/config)
> compiler: xtensa-linux-gcc (GCC) 14.2.0
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
> | Closes: https://lore.kernel.org/r/202502081655.FlCrxpYN-lkp@intel.com/
>
> smatch warnings:
> drivers/clk/imx/clk-imx8mp-audiomix.c:241
> clk_imx8mp_audiomix_reset_controller_register() warn: passing zero to
> 'PTR_ERR'
>
> vim +/PTR_ERR +241 drivers/clk/imx/clk-imx8mp-audiomix.c
>
> c350f4c434316c Jerome Brunet 2025-02-06 231 static int
> clk_imx8mp_audiomix_reset_controller_register(struct device *dev)
> 6f0e817175c5b2 Shengjiu Wang 2024-06-14 232 {
> c350f4c434316c Jerome Brunet 2025-02-06 233 struct auxiliary_device *adev;
> 6f0e817175c5b2 Shengjiu Wang 2024-06-14 234
> 6f0e817175c5b2 Shengjiu Wang 2024-06-14 235 if (!of_property_present(dev->of_node, "#reset-cells"))
> 6f0e817175c5b2 Shengjiu Wang 2024-06-14 236 return 0;
> 6f0e817175c5b2 Shengjiu Wang 2024-06-14 237
> c350f4c434316c Jerome Brunet 2025-02-06 238 adev = devm_auxiliary_device_create(dev, KBUILD_MODNAME,
> c350f4c434316c Jerome Brunet 2025-02-06 239 "reset", NULL, 0);
> c350f4c434316c Jerome Brunet 2025-02-06 240 if (IS_ERR_OR_NULL(adev))
> c350f4c434316c Jerome Brunet 2025-02-06 @241 return PTR_ERR(adev);
>
> If devm_auxiliary_device_create() could return NULL then that would count
> as success. But devm_auxiliary_device_create() can't return NULL. It
> only makes sense to return NULL if the auxiliary device is optional.
Hi Dan,
It should have been IS_ERR() there. It is something I've noticed and
fixed in the other changes before submitting the v2 but, somehow, this
one slipped through. Thanks for catching this. This is obviously still
present in the v3 I've sent yesterday but will be fixed on the next
version. I'm waiting for feedback on the core part before making another
one.
Cheers
>
> https://staticthinking.wordpress.com/2022/08/01/mixing-error-pointers-and-null/
>
> 6f0e817175c5b2 Shengjiu Wang 2024-06-14 242
> 6f0e817175c5b2 Shengjiu Wang 2024-06-14 243 return 0;
> 6f0e817175c5b2 Shengjiu Wang 2024-06-14 244 }
--
Jerome
next prev parent reply other threads:[~2025-02-12 10:16 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-06 18:23 [PATCH v2 0/7] driver core: auxiliary bus: add device creation helper Jerome Brunet
2025-02-06 18:23 ` [PATCH v2 1/7] " Jerome Brunet
2025-02-11 17:27 ` Jerome Brunet
2025-02-07 2:32 ` Ira Weiny
2025-02-06 18:23 ` [PATCH v2 2/7] reset: mpfs: use the auxiliary " Jerome Brunet
2025-02-06 18:23 ` [PATCH v2 3/7] drm/bridge: ti-sn65dsi86: " Jerome Brunet
2025-02-06 18:23 ` [PATCH v2 4/7] platform: arm64: lenovo-yoga-c630: " Jerome Brunet
2025-02-06 18:23 ` [PATCH v2 5/7] clk: eyeq: " Jerome Brunet
2025-02-06 18:23 ` [PATCH v2 6/7] clk: clk-imx8mp-audiomix: " Jerome Brunet
2025-02-12 7:26 ` Dan Carpenter
2025-02-12 10:16 ` Jerome Brunet [this message]
2025-02-06 18:23 ` [PATCH v2 7/7] clk: amlogic: axg-audio: use the auxiliary reset driver - take 2 Jerome Brunet
2025-02-06 18:32 ` [PATCH v2 0/7] driver core: auxiliary bus: add device creation helper Jerome Brunet
-- strict thread matches above, loose matches on Subject: below --
2025-02-08 8:42 [PATCH v2 6/7] clk: clk-imx8mp-audiomix: use the auxiliary " kernel test robot
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=1jldub1n8n.fsf@starbuckisacylon.baylibre.com \
--to=jbrunet@baylibre.com \
--cc=arnd@arndb.de \
--cc=dan.carpenter@linaro.org \
--cc=david.m.ertman@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=ira.weiny@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=oe-kbuild@lists.linux.dev \
--cc=rafael@kernel.org \
--cc=sboyd@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.