Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5943614ybi; Wed, 12 Jun 2019 11:07:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqwHwfGQNqP6XlrFhUoma/fWSLO18zPoDz8DgIVW5SeVvCGwUwmueIObSOIeHicr6hum/PhN X-Received: by 2002:a17:90b:d8b:: with SMTP id bg11mr510613pjb.30.1560362858543; Wed, 12 Jun 2019 11:07:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560362858; cv=none; d=google.com; s=arc-20160816; b=MharbBxNFE+hcYizmOLA+CEqoWU5qob7T8tyT3pcZxF1AQKo+w481TaJcWgpPJfsKZ bheLkOii9Ddw5HY3gky8PntcmNbjag1Go/3t8O7NITtPvR0cO1GB03gSZf9Y/HVT1O8n AA0nNbotr6RXxnOBgZd4AWOds2a340NNBs6EQITTGKdo12DUS+Or3V1BcdiaV8NQD1tF T9NXu3FxudHZxhnHo2kztP0px7DTSgA6f5I2VZiRzrH7PU458+fV2lVb7xbfZpTgWha2 rXlz9mHV4MC2Je72STi6S9ZI06MLwadgkpRp5/voLRVBsIUJI8gWCen7opzrQQwUhUxk PJvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=7EEXvCj6WOZOuq8mvFy+mJJM3AyGb+BSnwdmOFGruns=; b=gIrs1RqwFsjfCBRoSY4jLaJUAB1rGwLk92P8qCHRplwpvGAbb1OBrc1LCHv7Zniit+ vIqJaytnUK1N/WFY6+aDDje+nrwWvvduC3W0jQtO9gvR1pMRArQ/lxQqwCpXq0tVB3do kVAAyJ4IWMsKl7VIhpVNNzP9P8sFpJjPFQBqgsh7u3uZsm4PDVy3dB1duS5PopEmHk38 gPFvbFiRblaKWDN7uy5Uq+9jVod0IBIA0JC9GN++mTLlq2gZWSuynH9zhKiy00nAF1Ii R+dkcAbv/zmic8iH9LXfhPLvcFXtTFOVOxdF9H8d9E/6MlONIZha+KQXpOW/fYzIfDSG NIUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=LBAJ9Mxx; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s11si379801pfm.72.2019.06.12.11.07.23; Wed, 12 Jun 2019 11:07:38 -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; dkim=pass header.i=@kernel.org header.s=default header.b=LBAJ9Mxx; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2502219AbfFLQrN (ORCPT + 99 others); Wed, 12 Jun 2019 12:47:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:45196 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2502210AbfFLQrM (ORCPT ); Wed, 12 Jun 2019 12:47:12 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E1377208C2; Wed, 12 Jun 2019 16:47:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1560358032; bh=kfR8kNGOlTLzBEPDr9tom15y+byntqVAq6C+crySxUc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=LBAJ9MxxtREFIMi+AFW1jouZWiS7hRdNIJgHmr7g+MAL3t5bzE5nb4Hez4x8nOeKM lwDFpewKxDJ8oNAXN5b8DfsqhjcvvzX2vymp6hgid31KOw93OkAMExDDWkj+aMG8Jw QsFWDLFObaERIw/mf24nSS/Obzokel2lt1mxtnLc= Date: Wed, 12 Jun 2019 18:47:09 +0200 From: Greg Kroah-Hartman To: Sinan Kaya Cc: dan.j.williams@intel.com, vkoul@kernel.org, Andy Gross , David Brown , linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 6/6] dma: qcom: hidma: no need to check return value of debugfs_create functions Message-ID: <20190612164709.GA31124@kroah.com> References: <20190612122557.24158-1-gregkh@linuxfoundation.org> <20190612122557.24158-6-gregkh@linuxfoundation.org> <8185a8b8-a0ce-4a86-84a2-b51391356052@kernel.org> <20190612153948.GA21828@kroah.com> <78da53a1-1363-fad8-16fa-4dfc6555f4e4@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <78da53a1-1363-fad8-16fa-4dfc6555f4e4@kernel.org> User-Agent: Mutt/1.12.0 (2019-05-25) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 12, 2019 at 12:17:31PM -0400, Sinan Kaya wrote: > On 6/12/2019 11:39 AM, Greg Kroah-Hartman wrote: > >> Interesting. Wouldn't debugfs_create_file() blow up if dir is NULL > >> for some reason? > > It will create a file in the root of debugfs. But how will that happen? > > debugfs_create_dir() can not return NULL. > > I see. > > > > >> + debugfs_create_file("stats", S_IRUGO, dir, chan, > >> + &hidma_chan_fops); > >> > >> Note that code ignores the return value of hidma_debug_init(); > >> It was just trying to do clean up on debugfs failure by calling > >> > >> debugfs_remove_recursive(dmadev->debugfs); > > Is that a problem? > > I just wanted to double check. You probably want to remove the return > value on debugfs_create_file() to prevent others from doing the same > thing. That is my long-term goal, I have a ways to go still :) > Acked-by: Sinan Kaya Great, thanks for the review. greg k-h