linux_dsm_epyc7002/drivers/media/pci/saa7164
Kefeng Wang 50710eeefb media: saa7164: fix remove_proc_entry warning
if saa7164_proc_create() fails, saa7164_fini() will trigger a warning,

name 'saa7164'
WARNING: CPU: 1 PID: 6311 at fs/proc/generic.c:672 remove_proc_entry+0x1e8/0x3a0
  ? remove_proc_entry+0x1e8/0x3a0
  ? try_stop_module+0x7b/0x240
  ? proc_readdir+0x70/0x70
  ? rcu_read_lock_sched_held+0xd7/0x100
  saa7164_fini+0x13/0x1f [saa7164]
  __x64_sys_delete_module+0x30c/0x480
  ? __ia32_sys_delete_module+0x480/0x480
  ? __x64_sys_clock_gettime+0x11e/0x1c0
  ? __x64_sys_timer_create+0x1a0/0x1a0
  ? trace_hardirqs_off_caller+0x40/0x180
  ? do_syscall_64+0x18/0x450
  do_syscall_64+0x9f/0x450
  entry_SYSCALL_64_after_hwframe+0x49/0xbe

Fix it by checking the return of proc_create_single() before
calling remove_proc_entry().

Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
[hverkuil-cisco@xs4all.nl: use 0444 instead of S_IRUGO]
[hverkuil-cisco@xs4all.nl: use pr_info instead of KERN_INFO]
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-05-29 10:37:41 -04:00
..
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile media: don't include drivers/media/i2c at cflags 2017-12-28 14:14:09 -05:00
saa7164-api.c media: pci: fix several typos 2019-03-01 09:32:51 -05:00
saa7164-buffer.c media: drivers: improve a size determination 2017-09-23 08:20:57 -04:00
saa7164-bus.c [media] saa7164: fix double fetch PCIe access condition 2017-06-06 16:55:50 -03:00
saa7164-cards.c media: pci: fix several typos 2019-03-01 09:32:51 -05:00
saa7164-cmd.c [media] saa7164: better handle error codes 2017-05-19 07:08:05 -03:00
saa7164-core.c media: saa7164: fix remove_proc_entry warning 2019-05-29 10:37:41 -04:00
saa7164-dvb.c media: a few more typos at staging, pci, platform, radio and usb 2019-03-01 10:02:25 -05:00
saa7164-encoder.c media: replace strcpy() by strscpy() 2018-09-11 13:32:17 -04:00
saa7164-fw.c media: pci: fix several typos 2019-03-01 09:32:51 -05:00
saa7164-i2c.c media: use strscpy() instead of strlcpy() 2018-09-11 13:32:17 -04:00
saa7164-reg.h [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
saa7164-types.h [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
saa7164-vbi.c media: replace strcpy() by strscpy() 2018-09-11 13:32:17 -04:00
saa7164.h media: move dvb kAPI headers to include/media 2017-12-28 13:16:01 -05:00