0 day kernel build service
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: drivers/phy/freescale/phy-fsl-imx8mq-usb.c:133 tca_blk_typec_switch_set() error: 'imx_phy' dereferencing possible ERR_PTR()
Date: Fri, 24 Jul 2026 06:22:58 +0800	[thread overview]
Message-ID: <202607240502.1IavMLfa-lkp@intel.com> (raw)

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Franz Schnyder <franz.schnyder@toradex.com>
CC: Vinod Koul <vkoul@kernel.org>
CC: Frank Li <Frank.Li@nxp.com>
CC: Xu Yang <xu.yang_2@nxp.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   4539944e515183668109bdf4d0c3d7d228383d88
commit: 49ccab4bedd4779899246107dc19fb01c5b6fea3 phy: fsl-imx8mq-usb: fix typec orientation switch when built as module
date:   7 months ago
:::::: branch date: 27 hours ago
:::::: commit date: 7 months ago
config: powerpc-randconfig-r072-20260723 (https://download.01.org/0day-ci/archive/20260724/202607240502.1IavMLfa-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
smatch: v0.5.0-9187-g5189e3fb

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
| Fixes: 49ccab4bedd4 ("phy: fsl-imx8mq-usb: fix typec orientation switch when built as module")
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202607240502.1IavMLfa-lkp@intel.com/

smatch warnings:
drivers/phy/freescale/phy-fsl-imx8mq-usb.c:133 tca_blk_typec_switch_set() error: 'imx_phy' dereferencing possible ERR_PTR()

vim +/imx_phy +133 drivers/phy/freescale/phy-fsl-imx8mq-usb.c

efe81bea8915866 Li Jun  2018-11-15  124  
b58f0f86fd6156d Xu Yang 2024-12-04  125  
b58f0f86fd6156d Xu Yang 2024-12-04  126  static void tca_blk_orientation_set(struct tca_blk *tca,
b58f0f86fd6156d Xu Yang 2024-12-04  127  				enum typec_orientation orientation);
b58f0f86fd6156d Xu Yang 2024-12-04  128  
b58f0f86fd6156d Xu Yang 2024-12-04  129  static int tca_blk_typec_switch_set(struct typec_switch_dev *sw,
b58f0f86fd6156d Xu Yang 2024-12-04  130  				enum typec_orientation orientation)
b58f0f86fd6156d Xu Yang 2024-12-04  131  {
b58f0f86fd6156d Xu Yang 2024-12-04  132  	struct imx8mq_usb_phy *imx_phy = typec_switch_get_drvdata(sw);
b58f0f86fd6156d Xu Yang 2024-12-04 @133  	struct tca_blk *tca = imx_phy->tca;
b58f0f86fd6156d Xu Yang 2024-12-04  134  	int ret;
b58f0f86fd6156d Xu Yang 2024-12-04  135  
b58f0f86fd6156d Xu Yang 2024-12-04  136  	if (tca->orientation == orientation)
b58f0f86fd6156d Xu Yang 2024-12-04  137  		return 0;
b58f0f86fd6156d Xu Yang 2024-12-04  138  
b58f0f86fd6156d Xu Yang 2024-12-04  139  	ret = clk_prepare_enable(imx_phy->clk);
b58f0f86fd6156d Xu Yang 2024-12-04  140  	if (ret)
b58f0f86fd6156d Xu Yang 2024-12-04  141  		return ret;
b58f0f86fd6156d Xu Yang 2024-12-04  142  
b58f0f86fd6156d Xu Yang 2024-12-04  143  	tca_blk_orientation_set(tca, orientation);
b58f0f86fd6156d Xu Yang 2024-12-04  144  	clk_disable_unprepare(imx_phy->clk);
b58f0f86fd6156d Xu Yang 2024-12-04  145  
b58f0f86fd6156d Xu Yang 2024-12-04  146  	return 0;
b58f0f86fd6156d Xu Yang 2024-12-04  147  }
b58f0f86fd6156d Xu Yang 2024-12-04  148  

:::::: The code at line 133 was first introduced by commit
:::::: b58f0f86fd6156d7b084257f5c91ceaf7d760927 phy: fsl-imx8mq-usb: add tca function driver for imx95

:::::: TO: Xu Yang <xu.yang_2@nxp.com>
:::::: CC: Vinod Koul <vkoul@kernel.org>

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

             reply	other threads:[~2026-07-23 22:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-23 22:22 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-04-10  8:28 drivers/phy/freescale/phy-fsl-imx8mq-usb.c:133 tca_blk_typec_switch_set() error: 'imx_phy' dereferencing possible ERR_PTR() 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=202607240502.1IavMLfa-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=error27@gmail.com \
    --cc=oe-kbuild@lists.linux.dev \
    /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