Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp3594659imm; Wed, 5 Sep 2018 02:47:31 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaoZTq9Fb8ywm1wpoaq86N3RrV0PyKnG/WdIEH6CU80I2LIS10nVmqihRXtQ02ToXtEnXQH X-Received: by 2002:a62:198e:: with SMTP id 136-v6mr39652218pfz.103.1536140851402; Wed, 05 Sep 2018 02:47:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536140851; cv=none; d=google.com; s=arc-20160816; b=RihUlxi14Qxx/HWNYyV2NmmL4bOgl568q82SsTE7IaUQ8T/AlvafzTTMMVmI6LNhVf SFHK0GcbcTI5T3furVNzBYQHVxiNG+LXalw6v2GsB2i88FaPkrZz4lI4TkqcQSUEE39U nfP75NhgQFMky55oSIUEfY4Mi82PtlY02JcoI/vHCBdytgPk2bNAKMYWZLrYV5CEshZw VFRfKzkFF5GeOmkMkRbDcud/kbh6MrT1Fb7JAD5UDzvrv3m2Fz7PzUt1SS5d9Pg72MqK cK6bobHOQ5pD5xFbC48EHKvYIG7asxeRa4leoay2xXJ4I4K4+7hJw/RPhDdyjkn6foRj ZESw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=+YXZXSaMBfYnTMX+wDgj1/FNA0hjsB8c7rXkteiIpa0=; b=xmpDgt+6rjP1P3TQ7WtaDN9dwewGXDON9J6hERQx6z34fAnN8k9MLPzXKjz2hjN0SX 6uos0zWJPJId3tq5rDEzYm67bmEVajH/oWoRpJwWxHobxFLqoH/E1lDdkM8FbZjR/lPY keBzDMDcjCNtCQnA0UVBq5ZetNQq3fe5fSlx4o7TVTm6Sxtju4C0TG204mWS10aitSBR HlGkWoatq7QTY/jWu1KthpviH7MLoWYtKrA4pOYkbg1yvXX7VYKlg1jStELVsbEcM+gQ ko+vUz1eXtNeE5dAj00XlLNg0eNKh9yDjw7aNuuwRRRNxhRUVaKw9fk1TT2qfwQgbV0g ZsOQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 66-v6si1480042plb.428.2018.09.05.02.47.16; Wed, 05 Sep 2018 02:47:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728149AbeIEOPf (ORCPT + 99 others); Wed, 5 Sep 2018 10:15:35 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:52270 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725862AbeIEOPe (ORCPT ); Wed, 5 Sep 2018 10:15:34 -0400 Received: from 1.general.cking.uk.vpn ([10.172.193.212] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1fxUNx-0004CD-Hk; Wed, 05 Sep 2018 09:46:05 +0000 From: Colin King To: Greg Kroah-Hartman , Christian Gromm , Abdun Nihaal , devel@driverdev.osuosl.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] staging: most: video: fix registration of an empty comp core_component Date: Wed, 5 Sep 2018 10:46:05 +0100 Message-Id: <20180905094605.14827-1-colin.king@canonical.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Colin Ian King 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 #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: 1b10a0316e2d ("staging: most: video: remove aim designators") Signed-off-by: Colin Ian King --- drivers/staging/most/video/video.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/most/video/video.c b/drivers/staging/most/video/video.c index cf342eb58e10..ad7e28ab9a4f 100644 --- a/drivers/staging/most/video/video.c +++ b/drivers/staging/most/video/video.c @@ -530,7 +530,7 @@ static int comp_disconnect_channel(struct most_interface *iface, return 0; } -static struct core_component comp_info = { +static struct core_component comp = { .name = "video", .probe_channel = comp_probe_channel, .disconnect_channel = comp_disconnect_channel, @@ -565,7 +565,7 @@ static void __exit comp_exit(void) } spin_unlock_irq(&list_lock); - most_deregister_component(&comp_info); + most_deregister_component(&comp); BUG_ON(!list_empty(&video_devices)); } -- 2.17.1