Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp6147180iog; Thu, 23 Jun 2022 12:19:07 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vMWTOkxpsBtI/wDknJ+U47btKZ78czrlIe68qLny3SkuSDL38xNmLrwJh9lfETPy1aLfgh X-Received: by 2002:a63:380f:0:b0:40c:67ae:91ad with SMTP id f15-20020a63380f000000b0040c67ae91admr8661155pga.544.1656011947661; Thu, 23 Jun 2022 12:19:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656011947; cv=none; d=google.com; s=arc-20160816; b=ruhQYwXLE50CH5sYdGE92pKcHl0t3OdnhFWASXIThWvarVLjpdZ5Zi7Czx7Ugcuv6r zmJMAGzwYof0jg5tTbmxnYPlBtXlqSLn/ET5nWBrgM8Lue1NFE7JwBuUwd5+q6Eiechy NSUh0SIz3W8YsgqqaB8WAUncy5l/Vmv7f+KihJnS/SQ8B65ojWIiulTkdKoatejnkNxy 8Z+Y0KPqbFwdCU0yNA+lY6lG+aOe6mnemejxSpdSvFxPZy77mtyEqvYpDrwm0CPwpeDS SU8ibO08dHert30bgcF8NscRmqK/GQgQWJEI1OAP3M7UlbYNA7L9dknP8KCONljICrls XWqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=V+l7+IAqmHjVQANxvhG0CMKx5NpVFh0GQL/z/LRoj6Y=; b=ecp7d2yYizYNcNyeZAIk2nm+XhnKmTyu7xI/+joqAwTgbZLB6DhRAjeFdf6HCtummt 0eZI0YflnHV7XxAiY/0KnIu74lnIVO9myvdiBNuhLAFqtAO15cGVnm6TCXIQrwurhPQ2 W2ip5ucbVhBip3A7IanWoT02z3aFL6hxNz0IpU8nIz9uaGvIsvNy+kGhSbPaOjFYqgTe ZqrK7uODcLiVDstGFE+zy8y67bLdupAVeU5aYV4BjSWKZCrBOyY7sJEpywrVKvFwTxjO 9ZNahTMbcwc4uUpN1W+o1ntwZklYMI8Dx7AWXuf3MOZoneQxZ2k8eB956H84X/YMoba+ DNZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=mqcPXVvQ; 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 s18-20020aa78bd2000000b00525215ea340si6439pfd.70.2022.06.23.12.18.55; Thu, 23 Jun 2022 12:19:07 -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=mqcPXVvQ; 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 S232718AbiFWQ5G (ORCPT + 99 others); Thu, 23 Jun 2022 12:57:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57200 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231960AbiFWQwg (ORCPT ); Thu, 23 Jun 2022 12:52:36 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B4C9388B; Thu, 23 Jun 2022 09:52:31 -0700 (PDT) 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 dfw.source.kernel.org (Postfix) with ESMTPS id 8797561FC2; Thu, 23 Jun 2022 16:52:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 629A7C3411B; Thu, 23 Jun 2022 16:52:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1656003149; bh=hwza0RWJSq4Ba0aX/fWeFoGPUNuhh4zwFJUguPigW9o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mqcPXVvQFjgr8sBNpa4VOjxJn0zEp0w1K1nBqNTo30uUkW/6kv8AMCciAxeSzHMOo n+dCxrox1ivBsuAgBj1wLzYehOWfMjek2LbG0OEMNlNP+I6MAlfRp/uMTGacSoCdZG Zs/yWax4JgU3QYmmle/BkEAe8O/qu1ai8y6hORbc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Corentin Labbe , Herbert Xu , "Jason A. Donenfeld" Subject: [PATCH 4.9 146/264] hwrng: core - rewrite better comparison to NULL Date: Thu, 23 Jun 2022 18:42:19 +0200 Message-Id: <20220623164348.196072004@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220623164344.053938039@linuxfoundation.org> References: <20220623164344.053938039@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 From: Corentin LABBE commit 2a971e3b248775f808950bdc0ac75f12a2853eff upstream. This patch fix the checkpatch warning "Comparison to NULL could be written "!ptr" Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu Signed-off-by: Jason A. Donenfeld Signed-off-by: Greg Kroah-Hartman --- drivers/char/hw_random/core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/drivers/char/hw_random/core.c +++ b/drivers/char/hw_random/core.c @@ -439,8 +439,7 @@ int hwrng_register(struct hwrng *rng) int err = -EINVAL; struct hwrng *old_rng, *tmp; - if (rng->name == NULL || - (rng->data_read == NULL && rng->read == NULL)) + if (!rng->name || (!rng->data_read && !rng->read)) goto out; mutex_lock(&rng_mutex);