linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [linux-next:master 2460/4407] drivers/media/i2c/ov8865.c:2852 ov8865_probe() warn: passing zero to 'PTR_ERR'
@ 2021-01-19 18:57 Dan Carpenter
  2021-01-20 10:43 ` Paul Kocialkowski
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2021-01-19 18:57 UTC (permalink / raw)
  To: kbuild, Paul Kocialkowski
  Cc: lkp, kbuild-all, Linux Memory Management List,
	Mauro Carvalho Chehab, linux-media,
	Kévin L'hôpital, Sakari Ailus

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   b4bb878f3eb3e604ebfe83bbc17eb7af8d99cbf4
commit: 11c0d8fdccc56fa15cb15906480b4737c31dd085 [2460/4407] media: i2c: Add support for the OV8865 image sensor
config: i386-randconfig-m021-20210119 (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>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

smatch warnings:
drivers/media/i2c/ov8865.c:2852 ov8865_probe() warn: passing zero to 'PTR_ERR'

vim +/PTR_ERR +2852 drivers/media/i2c/ov8865.c

11c0d8fdccc56fa1 Paul Kocialkowski 2020-12-31  2840  	/* DOVDD: digital I/O */
11c0d8fdccc56fa1 Paul Kocialkowski 2020-12-31  2841  	sensor->dovdd = devm_regulator_get(dev, "dovdd");
11c0d8fdccc56fa1 Paul Kocialkowski 2020-12-31  2842  	if (IS_ERR(sensor->dvdd)) {
11c0d8fdccc56fa1 Paul Kocialkowski 2020-12-31  2843  		dev_err(dev, "cannot get DOVDD (digital I/O) regulator\n");
11c0d8fdccc56fa1 Paul Kocialkowski 2020-12-31  2844  		ret = PTR_ERR(sensor->dvdd);
11c0d8fdccc56fa1 Paul Kocialkowski 2020-12-31  2845  		goto error_endpoint;
11c0d8fdccc56fa1 Paul Kocialkowski 2020-12-31  2846  	}
11c0d8fdccc56fa1 Paul Kocialkowski 2020-12-31  2847  
11c0d8fdccc56fa1 Paul Kocialkowski 2020-12-31  2848  	/* AVDD: analog */
11c0d8fdccc56fa1 Paul Kocialkowski 2020-12-31  2849  	sensor->avdd = devm_regulator_get(dev, "avdd");
11c0d8fdccc56fa1 Paul Kocialkowski 2020-12-31  2850  	if (IS_ERR(sensor->avdd)) {
11c0d8fdccc56fa1 Paul Kocialkowski 2020-12-31  2851  		dev_err(dev, "cannot get AVDD (analog) regulator\n");
11c0d8fdccc56fa1 Paul Kocialkowski 2020-12-31 @2852  		ret = PTR_ERR(sensor->dvdd);

typo.  s/dvdd/avdd/.

11c0d8fdccc56fa1 Paul Kocialkowski 2020-12-31  2853  		goto error_endpoint;
11c0d8fdccc56fa1 Paul Kocialkowski 2020-12-31  2854  	}
11c0d8fdccc56fa1 Paul Kocialkowski 2020-12-31  2855  
11c0d8fdccc56fa1 Paul Kocialkowski 2020-12-31  2856  	/* External Clock */
11c0d8fdccc56fa1 Paul Kocialkowski 2020-12-31  2857  
11c0d8fdccc56fa1 Paul Kocialkowski 2020-12-31  2858  	sensor->extclk = devm_clk_get(dev, NULL);
11c0d8fdccc56fa1 Paul Kocialkowski 2020-12-31  2859  	if (IS_ERR(sensor->extclk)) {
11c0d8fdccc56fa1 Paul Kocialkowski 2020-12-31  2860  		dev_err(dev, "failed to get external clock\n");

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

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [linux-next:master 2460/4407] drivers/media/i2c/ov8865.c:2852 ov8865_probe() warn: passing zero to 'PTR_ERR'
  2021-01-19 18:57 [linux-next:master 2460/4407] drivers/media/i2c/ov8865.c:2852 ov8865_probe() warn: passing zero to 'PTR_ERR' Dan Carpenter
@ 2021-01-20 10:43 ` Paul Kocialkowski
  0 siblings, 0 replies; 2+ messages in thread
From: Paul Kocialkowski @ 2021-01-20 10:43 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: kbuild, lkp, kbuild-all, Linux Memory Management List,
	Mauro Carvalho Chehab, linux-media,
	Kévin L'hôpital, Sakari Ailus

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

Hi,

On Tue 19 Jan 21, 21:57, Dan Carpenter wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head:   b4bb878f3eb3e604ebfe83bbc17eb7af8d99cbf4
> commit: 11c0d8fdccc56fa15cb15906480b4737c31dd085 [2460/4407] media: i2c: Add support for the OV8865 image sensor
> config: i386-randconfig-m021-20210119 (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>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> smatch warnings:
> drivers/media/i2c/ov8865.c:2852 ov8865_probe() warn: passing zero to 'PTR_ERR'

Thanks, this was already reported and the fix is on its way :)

Cheers,

Paul

> vim +/PTR_ERR +2852 drivers/media/i2c/ov8865.c
> 
> 11c0d8fdccc56fa1 Paul Kocialkowski 2020-12-31  2840  	/* DOVDD: digital I/O */
> 11c0d8fdccc56fa1 Paul Kocialkowski 2020-12-31  2841  	sensor->dovdd = devm_regulator_get(dev, "dovdd");
> 11c0d8fdccc56fa1 Paul Kocialkowski 2020-12-31  2842  	if (IS_ERR(sensor->dvdd)) {
> 11c0d8fdccc56fa1 Paul Kocialkowski 2020-12-31  2843  		dev_err(dev, "cannot get DOVDD (digital I/O) regulator\n");
> 11c0d8fdccc56fa1 Paul Kocialkowski 2020-12-31  2844  		ret = PTR_ERR(sensor->dvdd);
> 11c0d8fdccc56fa1 Paul Kocialkowski 2020-12-31  2845  		goto error_endpoint;
> 11c0d8fdccc56fa1 Paul Kocialkowski 2020-12-31  2846  	}
> 11c0d8fdccc56fa1 Paul Kocialkowski 2020-12-31  2847  
> 11c0d8fdccc56fa1 Paul Kocialkowski 2020-12-31  2848  	/* AVDD: analog */
> 11c0d8fdccc56fa1 Paul Kocialkowski 2020-12-31  2849  	sensor->avdd = devm_regulator_get(dev, "avdd");
> 11c0d8fdccc56fa1 Paul Kocialkowski 2020-12-31  2850  	if (IS_ERR(sensor->avdd)) {
> 11c0d8fdccc56fa1 Paul Kocialkowski 2020-12-31  2851  		dev_err(dev, "cannot get AVDD (analog) regulator\n");
> 11c0d8fdccc56fa1 Paul Kocialkowski 2020-12-31 @2852  		ret = PTR_ERR(sensor->dvdd);
> 
> typo.  s/dvdd/avdd/.
> 
> 11c0d8fdccc56fa1 Paul Kocialkowski 2020-12-31  2853  		goto error_endpoint;
> 11c0d8fdccc56fa1 Paul Kocialkowski 2020-12-31  2854  	}
> 11c0d8fdccc56fa1 Paul Kocialkowski 2020-12-31  2855  
> 11c0d8fdccc56fa1 Paul Kocialkowski 2020-12-31  2856  	/* External Clock */
> 11c0d8fdccc56fa1 Paul Kocialkowski 2020-12-31  2857  
> 11c0d8fdccc56fa1 Paul Kocialkowski 2020-12-31  2858  	sensor->extclk = devm_clk_get(dev, NULL);
> 11c0d8fdccc56fa1 Paul Kocialkowski 2020-12-31  2859  	if (IS_ERR(sensor->extclk)) {
> 11c0d8fdccc56fa1 Paul Kocialkowski 2020-12-31  2860  		dev_err(dev, "failed to get external clock\n");
> 
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org



-- 
Paul Kocialkowski, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-01-20 10:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-19 18:57 [linux-next:master 2460/4407] drivers/media/i2c/ov8865.c:2852 ov8865_probe() warn: passing zero to 'PTR_ERR' Dan Carpenter
2021-01-20 10:43 ` Paul Kocialkowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox