Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753903AbcL3L1z (ORCPT ); Fri, 30 Dec 2016 06:27:55 -0500 Received: from mail-pf0-f194.google.com ([209.85.192.194]:35001 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753828AbcL3L1y (ORCPT ); Fri, 30 Dec 2016 06:27:54 -0500 From: Cheah Kok Cheong To: abbotti@mev.co.uk, hsweeten@visionengravers.com, gregkh@linuxfoundation.org Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Cheah Kok Cheong Subject: [PATCH 5/5] Staging: comedi: proc: Warn if unable to create proc entry Date: Fri, 30 Dec 2016 19:27:41 +0800 Message-Id: X-Mailer: git-send-email 2.7.4 In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 816 Lines: 25 The proc entry is not essential for the comedi system as evident by the support for !CONFIG_PROC_FS. So for failure to create, just warn and continue loading. Signed-off-by: Cheah Kok Cheong --- drivers/staging/comedi/proc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/comedi/proc.c b/drivers/staging/comedi/proc.c index 99b23b2e..2644dd4 100644 --- a/drivers/staging/comedi/proc.c +++ b/drivers/staging/comedi/proc.c @@ -89,7 +89,8 @@ static const struct file_operations comedi_proc_fops = { void __init comedi_proc_init(void) { - proc_create("comedi", 0444, NULL, &comedi_proc_fops); + if (!proc_create("comedi", 0444, NULL, &comedi_proc_fops)) + pr_warn("comedi: unable to create proc entry\n"); } void comedi_proc_cleanup(void) -- 2.7.4