Skip to content

Commit e55677b

Browse files
Colin Ian Kinggregkh
authored andcommitted
staging: most: video: fix registration of an empty comp core_component
[ Upstream commit 1f447e5 ] Currently we have structrues comp (which is empty) and comp_info being used to register and deregister the component. This mismatch in naming occurred from a previous commit that renamed aim_info to comp. Fix this to use consistent component naming in line with most/net, most/sound etc. This fixes the message two issues, one with a null empty name when loading the module: [ 1485.269515] most_core: registered new core component (null) and an Oops when removing the module: [ 1485.277971] BUG: unable to handle kernel NULL pointer dereference at 0000000000000008 [ 1485.278648] PGD 0 P4D 0 [ 1485.279253] Oops: 0002 [#2] SMP PTI [ 1485.279847] CPU: 1 PID: 32629 Comm: modprobe Tainted: P D WC OE 4.18.0-8-generic khadas#9 [ 1485.280442] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 0.0.0 02/06/2015 [ 1485.281040] RIP: 0010:most_deregister_component+0x3c/0x70 [most_core] .. etc Fixes: 1b10a03 ("staging: most: video: remove aim designators") Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Sasha Levin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 3b6ff8e commit e55677b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/staging/most/video/video.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ static int comp_disconnect_channel(struct most_interface *iface,
530530
return 0;
531531
}
532532

533-
static struct core_component comp_info = {
533+
static struct core_component comp = {
534534
.name = "video",
535535
.probe_channel = comp_probe_channel,
536536
.disconnect_channel = comp_disconnect_channel,
@@ -565,7 +565,7 @@ static void __exit comp_exit(void)
565565
}
566566
spin_unlock_irq(&list_lock);
567567

568-
most_deregister_component(&comp_info);
568+
most_deregister_component(&comp);
569569
BUG_ON(!list_empty(&video_devices));
570570
}
571571

0 commit comments

Comments
 (0)