drivers/media/i2c/imx274.c:1864 imx274_probe() error: uninitialized symbol 'ret'.
PATCH 4/19 drivers/media/i2c/imx274.c:1864 imx274_probe() error: uninitialized symbol 'ret'.
tree: git://linuxtv.org/hverkuil/media_tree.git tegrav5 head: acec5ab54458eb5f6c64faf259a83305398fcff7 commit: 1db17015125eb03cd05ce850e47e21f033b950ba [4/19] media: i2c: Add support for IMX274 supplies and external clock config: i386-randconfig-m021-20201011 (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 <[email protected]>
Reported-by Dan Carpenter <[email protected]>
smatch warnings:drivers/media/i2c/imx274.c:1864 imx274_probe() error: uninitialized symbol 'ret'.
vim +/ret +1864 drivers/media/i2c/imx274.c
e671499303e4c0e Kieran Bingham 2019-07-10 1848 static int imx274_probe(struct i2c_client *client)
0985dd306f727df Leon Luo 2017-10-05 1849 {
0985dd306f727df Leon Luo 2017-10-05 1850 struct v4l2_subdev *sd;
0985dd306f727df Leon Luo 2017-10-05 1851 struct stimx274 *imx274;
0985dd306f727df Leon Luo 2017-10-05 1852 int ret;
^^^^^^^0985dd306f727df Leon Luo 2017-10-05 1853
0985dd306f727df Leon Luo 2017-10-05 1854 /* initialize imx274 */
0985dd306f727df Leon Luo 2017-10-05 1855 imx274 = devm_kzalloc(&client->dev, sizeof(*imx274), GFP_KERNEL);
0985dd306f727df Leon Luo 2017-10-05 1856 if (!imx274)
0985dd306f727df Leon Luo 2017-10-05 1857 return -ENOMEM;
0985dd306f727df Leon Luo 2017-10-05 1858
0985dd306f727df Leon Luo 2017-10-05 1859 mutex_init(&imx274->lock);
0985dd306f727df Leon Luo 2017-10-05 1860
1db17015125eb03 Sowjanya Komatineni 2020-06-03 1861 imx274->xclk = devm_clk_get(&client->dev, "xclk");
1db17015125eb03 Sowjanya Komatineni 2020-06-03 1862 if (IS_ERR(imx274->xclk)) {
1db17015125eb03 Sowjanya Komatineni 2020-06-03 1863 dev_err(&client->dev, "Failed to get xclk\n");1db17015125eb03 Sowjanya Komatineni 2020-06-03 @1864 return ret;
"ret" is uninitialized. return PTR_ERR(imx274->xclk);
1db17015125eb03 Sowjanya Komatineni 2020-06-03 1865 }
1db17015125eb03 Sowjanya Komatineni 2020-06-03 1866
1db17015125eb03 Sowjanya Komatineni 2020-06-03 1867 ret = clk_set_rate(imx274->xclk, IMX274_DEFAULT_CLK_FREQ);
1db17015125eb03 Sowjanya Komatineni 2020-06-03 1868 if (ret < 0) {
1db17015125eb03 Sowjanya Komatineni 2020-06-03 1869 dev_err(&client->dev, "Failed to set xclk rate\n");
1db17015125eb03 Sowjanya Komatineni 2020-06-03 1870 return ret;
1db17015125eb03 Sowjanya Komatineni 2020-06-03 1871 }---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org