From: Dan Carpenter <error27@gmail.com>
To: oe-kbuild@lists.linux.dev, Kate Hsuan <hpa@redhat.com>
Cc: lkp@intel.com, oe-kbuild-all@lists.linux.dev,
linux-media@vger.kernel.org, Hans Verkuil <hverkuil@kernel.org>,
Hans de Goede <johannes.goede@oss.qualcomm.com>,
Sakari Ailus <sakari.ailus@linux.intel.com>
Subject: [linuxtv-media-pending:next 165/183] drivers/media/i2c/t4ka3.c:577 t4ka3_enable_stream() warn: pm_runtime_get_sync() also returns 1 on success
Date: Mon, 30 Mar 2026 12:30:34 +0300 [thread overview]
Message-ID: <acpCusUjXndiISEI@stanley.mountain> (raw)
tree: https://git.linuxtv.org/media-ci/media-pending.git next
head: 4fbeef21f5387234111b5d52924e77757626faa5
commit: fd55319692151de2b89c21356d1445bce364769b [165/183] media: Add t4ka3 camera sensor driver
config: um-randconfig-r072-20260327 (https://download.01.org/0day-ci/archive/20260328/202603280011.CCbaQy6n-lkp@intel.com/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project 054e11d1a17e5ba88bb1a8ef32fad3346e80b186)
rustc: rustc 1.88.0 (6b00bc388 2025-06-23)
smatch: v0.5.0-9004-gb810ac53
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 <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202603280011.CCbaQy6n-lkp@intel.com/
smatch warnings:
drivers/media/i2c/t4ka3.c:577 t4ka3_enable_stream() warn: pm_runtime_get_sync() also returns 1 on success
vim +577 drivers/media/i2c/t4ka3.c
fd55319692151d Kate Hsuan 2026-03-25 558 static int t4ka3_enable_stream(struct v4l2_subdev *sd,
fd55319692151d Kate Hsuan 2026-03-25 559 struct v4l2_subdev_state *state,
fd55319692151d Kate Hsuan 2026-03-25 560 u32 pad, u64 streams_mask)
fd55319692151d Kate Hsuan 2026-03-25 561 {
fd55319692151d Kate Hsuan 2026-03-25 562 struct t4ka3_data *sensor = to_t4ka3_sensor(sd);
fd55319692151d Kate Hsuan 2026-03-25 563 int ret;
fd55319692151d Kate Hsuan 2026-03-25 564
fd55319692151d Kate Hsuan 2026-03-25 565 ret = pm_runtime_get_sync(sensor->sd.dev);
fd55319692151d Kate Hsuan 2026-03-25 566 if (ret < 0) {
pm_runtime_get_sync can return either zero or one on success.
(See the comments next to that function). Probably use
pm_runtime_resume_and_get() instead.
fd55319692151d Kate Hsuan 2026-03-25 567 dev_err(sensor->dev, "power-up err.\n");
fd55319692151d Kate Hsuan 2026-03-25 568 goto error_powerdown;
fd55319692151d Kate Hsuan 2026-03-25 569 }
fd55319692151d Kate Hsuan 2026-03-25 570
fd55319692151d Kate Hsuan 2026-03-25 571 cci_multi_reg_write(sensor->regmap, t4ka3_init_config,
fd55319692151d Kate Hsuan 2026-03-25 572 ARRAY_SIZE(t4ka3_init_config), &ret);
If we pass 1 to cci_multi_reg_write() it is treated
as an error and it returns immediately.
fd55319692151d Kate Hsuan 2026-03-25 573 /* enable group hold */
fd55319692151d Kate Hsuan 2026-03-25 574 cci_write(sensor->regmap, T4KA3_REG_PARAM_HOLD, 1, &ret);
fd55319692151d Kate Hsuan 2026-03-25 575 cci_multi_reg_write(sensor->regmap, t4ka3_pre_mode_set_regs,
fd55319692151d Kate Hsuan 2026-03-25 576 ARRAY_SIZE(t4ka3_pre_mode_set_regs), &ret);
fd55319692151d Kate Hsuan 2026-03-25 @577 if (ret)
fd55319692151d Kate Hsuan 2026-03-25 578 goto error_powerdown;
And we error out here with ret == 1.
fd55319692151d Kate Hsuan 2026-03-25 579
fd55319692151d Kate Hsuan 2026-03-25 580 ret = t4ka3_set_mode(sensor, state);
fd55319692151d Kate Hsuan 2026-03-25 581 if (ret)
fd55319692151d Kate Hsuan 2026-03-25 582 goto error_powerdown;
fd55319692151d Kate Hsuan 2026-03-25 583
fd55319692151d Kate Hsuan 2026-03-25 584 ret = cci_multi_reg_write(sensor->regmap, t4ka3_post_mode_set_regs,
fd55319692151d Kate Hsuan 2026-03-25 585 ARRAY_SIZE(t4ka3_post_mode_set_regs), NULL);
fd55319692151d Kate Hsuan 2026-03-25 586 if (ret)
fd55319692151d Kate Hsuan 2026-03-25 587 goto error_powerdown;
fd55319692151d Kate Hsuan 2026-03-25 588
fd55319692151d Kate Hsuan 2026-03-25 589 /* Restore value of all ctrls */
fd55319692151d Kate Hsuan 2026-03-25 590 ret = __v4l2_ctrl_handler_setup(&sensor->ctrls.handler);
fd55319692151d Kate Hsuan 2026-03-25 591 if (ret)
fd55319692151d Kate Hsuan 2026-03-25 592 goto error_powerdown;
fd55319692151d Kate Hsuan 2026-03-25 593
fd55319692151d Kate Hsuan 2026-03-25 594 /* disable group hold */
fd55319692151d Kate Hsuan 2026-03-25 595 cci_write(sensor->regmap, T4KA3_REG_PARAM_HOLD, 0, &ret);
fd55319692151d Kate Hsuan 2026-03-25 596 cci_write(sensor->regmap, T4KA3_REG_STREAM, 1, &ret);
fd55319692151d Kate Hsuan 2026-03-25 597 if (ret)
fd55319692151d Kate Hsuan 2026-03-25 598 goto error_powerdown;
fd55319692151d Kate Hsuan 2026-03-25 599
fd55319692151d Kate Hsuan 2026-03-25 600 sensor->streaming = 1;
fd55319692151d Kate Hsuan 2026-03-25 601
fd55319692151d Kate Hsuan 2026-03-25 602 return ret;
fd55319692151d Kate Hsuan 2026-03-25 603
fd55319692151d Kate Hsuan 2026-03-25 604 error_powerdown:
fd55319692151d Kate Hsuan 2026-03-25 605 pm_runtime_put(sensor->sd.dev);
fd55319692151d Kate Hsuan 2026-03-25 606
fd55319692151d Kate Hsuan 2026-03-25 607 return ret;
fd55319692151d Kate Hsuan 2026-03-25 608 }
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2026-03-30 9:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-30 9:30 Dan Carpenter [this message]
2026-03-30 10:38 ` [linuxtv-media-pending:next 165/183] drivers/media/i2c/t4ka3.c:577 t4ka3_enable_stream() warn: pm_runtime_get_sync() also returns 1 on success Sakari Ailus
-- strict thread matches above, loose matches on Subject: below --
2026-03-27 16:42 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=acpCusUjXndiISEI@stanley.mountain \
--to=error27@gmail.com \
--cc=hpa@redhat.com \
--cc=hverkuil@kernel.org \
--cc=johannes.goede@oss.qualcomm.com \
--cc=linux-media@vger.kernel.org \
--cc=lkp@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=oe-kbuild@lists.linux.dev \
--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