All of lore.kernel.org
 help / color / mirror / Atom feed
* [drm-drm-misc:drm-misc-next 2/2] drivers/gpu/drm/bridge/tc358775.c:687 tc_probe() warn: passing zero to 'PTR_ERR'
@ 2020-08-16  5:18 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-08-16  5:18 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2764 bytes --]

tree:   git://anongit.freedesktop.org/drm/drm-misc drm-misc-next
head:   b26975593b17c2c7188b96dba6fe9fff14480538
commit: b26975593b17c2c7188b96dba6fe9fff14480538 [2/2] display/drm/bridge: TC358775 DSI/LVDS driver
config: i386-randconfig-m021-20200816 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

smatch warnings:
drivers/gpu/drm/bridge/tc358775.c:687 tc_probe() warn: passing zero to 'PTR_ERR'

vim +/PTR_ERR +687 drivers/gpu/drm/bridge/tc358775.c

   648	
   649	static int tc_probe(struct i2c_client *client, const struct i2c_device_id *id)
   650	{
   651		struct device *dev = &client->dev;
   652		struct drm_panel *panel;
   653		struct tc_data *tc;
   654		int ret;
   655	
   656		tc = devm_kzalloc(dev, sizeof(*tc), GFP_KERNEL);
   657		if (!tc)
   658			return -ENOMEM;
   659	
   660		tc->dev = dev;
   661		tc->i2c = client;
   662	
   663		ret = drm_of_find_panel_or_bridge(dev->of_node, TC358775_LVDS_OUT0,
   664						  0, &panel, NULL);
   665		if (ret < 0)
   666			return ret;
   667		if (!panel)
   668			return -ENODEV;
   669	
   670		tc->panel_bridge = devm_drm_panel_bridge_add(dev, panel);
   671		if (IS_ERR(tc->panel_bridge))
   672			return PTR_ERR(tc->panel_bridge);
   673	
   674		ret = tc358775_parse_dt(dev->of_node, tc);
   675		if (ret)
   676			return ret;
   677	
   678		tc->vddio = devm_regulator_get(dev, "vddio-supply");
   679		if (IS_ERR(tc->vddio)) {
   680			ret = PTR_ERR(tc->vddio);
   681			dev_err(dev, "vddio-supply not found\n");
   682			return ret;
   683		}
   684	
   685		tc->vdd = devm_regulator_get(dev, "vdd-supply");
   686		if (IS_ERR(tc->vdd)) {
 > 687			ret = PTR_ERR(tc->vddio);
   688			dev_err(dev, "vdd-supply not found\n");
   689			return ret;
   690		}
   691	
   692		tc->stby_gpio = devm_gpiod_get(dev, "stby", GPIOD_OUT_HIGH);
   693		if (IS_ERR(tc->stby_gpio)) {
   694			ret = PTR_ERR(tc->stby_gpio);
   695			dev_err(dev, "cannot get stby-gpio %d\n", ret);
   696			return ret;
   697		}
   698	
   699		tc->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH);
   700		if (IS_ERR(tc->reset_gpio)) {
   701			ret = PTR_ERR(tc->reset_gpio);
   702			dev_err(dev, "cannot get reset-gpios %d\n", ret);
   703			return ret;
   704		}
   705	
   706		tc->bridge.funcs = &tc_bridge_funcs;
   707		tc->bridge.of_node = dev->of_node;
   708		drm_bridge_add(&tc->bridge);
   709	
   710		i2c_set_clientdata(client, tc);
   711	
   712		return 0;
   713	}
   714	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 47602 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-08-16  5:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-16  5:18 [drm-drm-misc:drm-misc-next 2/2] drivers/gpu/drm/bridge/tc358775.c:687 tc_probe() warn: passing zero to 'PTR_ERR' kernel test robot

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.