Skip to contentSkip to conversation

drivers/media/radio/si470x/radio-si470x-i2c.c:462:25-30: ERROR: reference preceded by free on line 460 (fwd)

PATCH In review Julia Lawall 3 participants 3 messages Jan 31, 2020 – Feb 3, 2020 Stable branch

lore
Share & tools
lore
#0 lore raw

PATCH 136/224 drivers/media/radio/si470x/radio-si470x-i2c.c:462:25-30: ERROR: reference preceded by free on line 460 (fwd)

The code on line 462 looks suspicious.

julia

---------- Forwarded message ----------
Date: Fri, 31 Jan 2020 16:56:26 +0800
From: kbuild test robot <[email protected]>
To: kbuild(a)lists.01.org
Cc: Julia Lawall <[email protected]>
Subject: [lee:android-3.18-preview 136/224]
drivers/media/radio/si470x/radio-si470x-i2c.c:462:25-30: ERROR: reference preceded by free on line 460

CC: kbuild-all(a)lists.01.org
BCC: philip.li(a)intel.com
TO: Lee Jones <[email protected]>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/lee/linux.git android-3.18-preview
head:   356017eeb20d27b17d236ff6b31c0b7d24dff865
commit: 752c36757aa40c2f669d7da128aae237f9fd3318 [136/224] media: si470x-i2c: add missed operations in remove

:::::: branch date: 18 hours ago
:::::: commit date: 6 days ago

If you fix the issue, kindly add following tag

Quoted 1 line
Quoted 1 line

drivers/media/radio/si470x/radio-si470x-i2c.c:462:25-30: ERROR: reference preceded by free on line 460

# https://git.kernel.org/pub/scm/linux/kernel/git/lee/linux.git/commit/?id=752c36757aa40c2f669d7da128aae237f9fd3318
git remote add lee https://git.kernel.org/pub/scm/linux/kernel/git/lee/linux.git
git remote update lee
git checkout 752c36757aa40c2f669d7da128aae237f9fd3318
vim +462 drivers/media/radio/si470x/radio-si470x-i2c.c

cc35bbddfe10f7 Joonyoung Shim     2009-08-09  449
9dcb79c2eedb5b Tobias Lorenz      2009-08-10  450
9dcb79c2eedb5b Tobias Lorenz      2009-08-10  451  /*
9dcb79c2eedb5b Tobias Lorenz      2009-08-10  452   * si470x_i2c_remove - remove the device
9dcb79c2eedb5b Tobias Lorenz      2009-08-10  453   */
4c62e9764ab403 Greg Kroah-Hartman 2012-12-21  454  static int si470x_i2c_remove(struct i2c_client *client)
cc35bbddfe10f7 Joonyoung Shim     2009-08-09  455  {
cc35bbddfe10f7 Joonyoung Shim     2009-08-09  456  	struct si470x_device *radio = i2c_get_clientdata(client);
cc35bbddfe10f7 Joonyoung Shim     2009-08-09  457
fe2137dd4e6e4b Joonyoung Shim     2009-12-10  458  	free_irq(client->irq, radio);
4967d53dbbcebf Hans Verkuil       2012-05-04  459  	video_unregister_device(&radio->videodev);
cc35bbddfe10f7 Joonyoung Shim     2009-08-09 @460  	kfree(radio);
cc35bbddfe10f7 Joonyoung Shim     2009-08-09  461
752c36757aa40c Chuhong Yuan       2019-11-10 @462  	v4l2_ctrl_handler_free(&radio->hdl);
752c36757aa40c Chuhong Yuan       2019-11-10  463  	v4l2_device_unregister(&radio->v4l2_dev);
cc35bbddfe10f7 Joonyoung Shim     2009-08-09  464  	return 0;
cc35bbddfe10f7 Joonyoung Shim     2009-08-09  465  }
cc35bbddfe10f7 Joonyoung Shim     2009-08-09  466

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org Intel Corporation

#1 lore raw
Quoted 1 line · Julia Lawall

The code on line 462 looks suspicious.

Thank you Julia.

Have you already reported this to the other Stable Maintainers?

This issue appears to affect; 4.4, 4.9, 4.14 and 4.19.

Quoted 53 lines

---------- Forwarded message ----------
Date: Fri, 31 Jan 2020 16:56:26 +0800
From: kbuild test robot <[email protected]>
To: [email protected]
Cc: Julia Lawall <[email protected]>
Subject: [lee:android-3.18-preview 136/224]
drivers/media/radio/si470x/radio-si470x-i2c.c:462:25-30: ERROR: reference preceded by free on line 460

CC: [email protected]
BCC: [email protected]
TO: Lee Jones <[email protected]>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/lee/linux.git android-3.18-preview
head:   356017eeb20d27b17d236ff6b31c0b7d24dff865
commit: 752c36757aa40c2f669d7da128aae237f9fd3318 [136/224] media: si470x-i2c: add missed operations in remove

:::::: branch date: 18 hours ago
:::::: commit date: 6 days ago

If you fix the issue, kindly add following tag

Quoted 1 line
Quoted 1 line

drivers/media/radio/si470x/radio-si470x-i2c.c:462:25-30: ERROR: reference preceded by free on line 460

# https://git.kernel.org/pub/scm/linux/kernel/git/lee/linux.git/commit/?id=752c36757aa40c2f669d7da128aae237f9fd3318
git remote add lee https://git.kernel.org/pub/scm/linux/kernel/git/lee/linux.git
git remote update lee
git checkout 752c36757aa40c2f669d7da128aae237f9fd3318
vim +462 drivers/media/radio/si470x/radio-si470x-i2c.c

cc35bbddfe10f7 Joonyoung Shim     2009-08-09  449
9dcb79c2eedb5b Tobias Lorenz      2009-08-10  450
9dcb79c2eedb5b Tobias Lorenz      2009-08-10  451  /*
9dcb79c2eedb5b Tobias Lorenz      2009-08-10  452   * si470x_i2c_remove - remove the device
9dcb79c2eedb5b Tobias Lorenz      2009-08-10  453   */
4c62e9764ab403 Greg Kroah-Hartman 2012-12-21  454  static int si470x_i2c_remove(struct i2c_client *client)
cc35bbddfe10f7 Joonyoung Shim     2009-08-09  455  {
cc35bbddfe10f7 Joonyoung Shim     2009-08-09  456  	struct si470x_device *radio = i2c_get_clientdata(client);
cc35bbddfe10f7 Joonyoung Shim     2009-08-09  457
fe2137dd4e6e4b Joonyoung Shim     2009-12-10  458  	free_irq(client->irq, radio);
4967d53dbbcebf Hans Verkuil       2012-05-04  459  	video_unregister_device(&radio->videodev);
cc35bbddfe10f7 Joonyoung Shim     2009-08-09 @460  	kfree(radio);
cc35bbddfe10f7 Joonyoung Shim     2009-08-09  461
752c36757aa40c Chuhong Yuan       2019-11-10 @462  	v4l2_ctrl_handler_free(&radio->hdl);
752c36757aa40c Chuhong Yuan       2019-11-10  463  	v4l2_device_unregister(&radio->v4l2_dev);
cc35bbddfe10f7 Joonyoung Shim     2009-08-09  464  	return 0;
cc35bbddfe10f7 Joonyoung Shim     2009-08-09  465  }
cc35bbddfe10f7 Joonyoung Shim     2009-08-09  466

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/[email protected] Intel Corporation

Signature · 4 lines
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
maintainer
#2 lore raw
Quoted 9 lines · Lee Jones
Quoted 1 line · Julia Lawall

The code on line 462 looks suspicious.

Thank you Julia.

Have you already reported this to the other Stable Maintainers?

This issue appears to affect; 4.4, 4.9, 4.14 and 4.19.

Ick :(

Can you send us a fix-up patch for this to be applied everywhere?

thanks,

greg k-h