Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp78222rwp; Wed, 12 Jul 2023 09:57:23 -0700 (PDT) X-Google-Smtp-Source: APBJJlH/xqqTTp5GgcNPBQPywA9UfTLNjwQ70vXGGWJm81Km7NOKkDFjUMwRXW/VBZ2jxPqVid7/ X-Received: by 2002:a05:6a20:1c6:b0:118:eeef:2a25 with SMTP id 6-20020a056a2001c600b00118eeef2a25mr18397331pzz.34.1689181042932; Wed, 12 Jul 2023 09:57:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689181042; cv=none; d=google.com; s=arc-20160816; b=vrPv690RhLw0QGkk9ux8PjQqABlP3TAZd/5lO30ROd7rlxXsIARaMK7y6A81fbi6QJ IIjOH9vqGqN4GcGiBAb3UiJa3I9LucZS9Lv9WC/JGA/7xpvD/Fq/h5haiFRT0vu3FXKh ZS11ZJEF9Q/4/Wfe+H+PjZHuC1oybFSdlo8qWWs8zi+WpQfnZeopYPZKmDCtO/7bjiYO +IZX4ta7VsKZhktbE/VoDBK7re9NbHILdU4ArqGoujGXv73ya225ih91B+wj+8BrOpZ5 iiUIZ3DhPIaSgP1a34OJredEIrPEWetSGtBQYhe/UZ3DoGkjRCxCbYV1aRXvR3dFjvx1 IiEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=njecfll42R3Akw9MRX5syeHmJI9CrXNlkEWou/kAVRQ=; fh=NxHj/OXFwjkSQdmxij+QaJjER62QmBlc+kQPaDBeXTE=; b=vY/mQoTrsSrecToZz7phUCDt5cRXJN/yEwZgE0g0oxUvGI4BSEEYukecJ8k00zyLgq NlFVnDJ83Qpcun8ycmXRYLnHIkS1tBODl235LxA4mmSlxG18HeIA6ThhWbP5jI4VujDf vbQ1N7vmVDDltH6AQk+T7Rd2/U6hHCIvSKESZPNIxTs7fTfXzOFpKBHbI8dxEWLeeJ1r SMsgndDyLbjdm0+nGcXxPHXuffrRIEZdjr7/gsgUB+7uOJldbiSoZGEFfvhayuOYLJ7C pCbyozCMDn68xBUOn1UYkzLp5AjmORi4jyyZuK0lqWuvHemO/VGKhvl9slZXLZXK9UGm dLjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=vZaB37I0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id eh13-20020a056a00808d00b006535a72d26csi3446752pfb.152.2023.07.12.09.57.10; Wed, 12 Jul 2023 09:57:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=vZaB37I0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232139AbjGLQfR (ORCPT + 99 others); Wed, 12 Jul 2023 12:35:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231537AbjGLQfQ (ORCPT ); Wed, 12 Jul 2023 12:35:16 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B361E1711 for ; Wed, 12 Jul 2023 09:35:13 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 485B86183B for ; Wed, 12 Jul 2023 16:35:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2B854C433CA; Wed, 12 Jul 2023 16:35:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1689179712; bh=lEOMrk2R8PBpUbiIy/xxH/SlLLTYsrBU5sRxDqjf7rA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=vZaB37I0s4Q0o7G57kLJC9B0sVkua69J9BzJ24Pi09bG0toae+Uzc47t3PcSWGXTh vqgfRjZIaxOQyR0hnO+TKpNLRtPU3EHNCMfdx2wkTIhaCTkSQAiPGv4j7TaA18cP1S cOvjtQtMrodIsiO5Q1TyAB+9hfAXRgrquUu8hDew= Date: Wed, 12 Jul 2023 18:35:10 +0200 From: Greg Kroah-Hartman To: Wang Ming Cc: Arve =?iso-8859-1?B?SGr4bm5lduVn?= , Todd Kjos , Martijn Coenen , Joel Fernandes , Christian Brauner , Carlos Llamas , Suren Baghdasaryan , linux-kernel@vger.kernel.org, opensource.kernel@vivo.com Subject: Re: [PATCH v1] android:Fix error checking for debugfs_create_dir() in binder_init() Message-ID: <2023071257-patronize-unfeeling-cbe5@gregkh> References: <20230712133920.9509-1-machel@vivo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230712133920.9509-1-machel@vivo.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 12, 2023 at 09:39:07PM +0800, Wang Ming wrote: > debugfs_create_dir() does not return NULL,but it is > possible to return error pointer. Most incorrect error checks > were fixed,but the one in binder_init() was forgotten. > > Fix the remaining error check. > > Signed-off-by: Wang Ming > --- > drivers/android/binder.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/android/binder.c b/drivers/android/binder.c > index 486c8271cab7..3b5309484df6 100644 > --- a/drivers/android/binder.c > +++ b/drivers/android/binder.c > @@ -6566,7 +6566,7 @@ static int __init binder_init(void) > atomic_set(&binder_transaction_log_failed.cur, ~0U); > > binder_debugfs_dir_entry_root = debugfs_create_dir("binder", NULL); > - if (binder_debugfs_dir_entry_root) { > + if (!IS_ERR(binder_debugfs_dir_entry_root)) { Again, no need to check this at all. thanks, greg k-h