Message ID | 20211220143020.220263130@linuxfoundation.org |
---|---|
State | New |
Headers | show
Return-Path: <stable-owner@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E3658C433F5 for <stable@archiver.kernel.org>; Mon, 20 Dec 2021 14:38:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233907AbhLTOiX (ORCPT <rfc822;stable@archiver.kernel.org>); Mon, 20 Dec 2021 09:38:23 -0500 Received: from sin.source.kernel.org ([145.40.73.55]:52586 "EHLO sin.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234195AbhLTOh4 (ORCPT <rfc822;stable@vger.kernel.org>); Mon, 20 Dec 2021 09:37:56 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 9A83ACE1103; Mon, 20 Dec 2021 14:37:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 64AB0C36AE7; Mon, 20 Dec 2021 14:37:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1640011072; bh=d9CFAWlVLbebVEtybYuJkd9Ie6Q3S67NKzlbMD99dTI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WZVIPnCWwWQDO7JEeWP3GJV5d0rfF3+KZFL4k6xY9SV9KMFgpbSmyeuT99w/R5KYK Hajqc5BXvIje/Rn/SjdfwmlWJcEd/b0Gl6BW7Fuogcv5csmBTAUorqMsIX10Lgar0F AOqQ6e8mvkfvO3pl0/J1/WDpvybBOctqBI63NLsA= From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org, Armin Wolf <W_Armin@gmx.de>, =?utf-8?q?Pali_Roh=C3=A1r?= <pali@kernel.org>, Guenter Roeck <linux@roeck-us.net> Subject: [PATCH 4.9 07/31] hwmon: (dell-smm) Fix warning on /proc/i8k creation error Date: Mon, 20 Dec 2021 15:34:07 +0100 Message-Id: <20211220143020.220263130@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211220143019.974513085@linuxfoundation.org> References: <20211220143019.974513085@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: <stable.vger.kernel.org> X-Mailing-List: stable@vger.kernel.org |
Series |
None
|
expand
|
--- a/drivers/hwmon/dell-smm-hwmon.c +++ b/drivers/hwmon/dell-smm-hwmon.c @@ -578,15 +578,18 @@ static const struct file_operations i8k_ .unlocked_ioctl = i8k_ioctl, }; +static struct proc_dir_entry *entry; + static void __init i8k_init_procfs(void) { /* Register the proc entry */ - proc_create("i8k", 0, NULL, &i8k_fops); + entry = proc_create("i8k", 0, NULL, &i8k_fops); } static void __exit i8k_exit_procfs(void) { - remove_proc_entry("i8k", NULL); + if (entry) + remove_proc_entry("i8k", NULL); } #else