From patchwork Tue Apr 5 07:26:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 557998 Return-Path: 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 7D442C47089 for ; Tue, 5 Apr 2022 08:32:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236794AbiDEI2d (ORCPT ); Tue, 5 Apr 2022 04:28:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239652AbiDEIUY (ORCPT ); Tue, 5 Apr 2022 04:20:24 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B06D300; Tue, 5 Apr 2022 01:18:19 -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 CC2C460B0F; Tue, 5 Apr 2022 08:18:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D9E8CC385A0; Tue, 5 Apr 2022 08:18:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649146698; bh=ua3FRoip4E4TDFUqlECOPo1pohsiElxMkxPXpMTxw2w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=juedjME0Tp7fxp3vgiR3RfgSvPGe+RXvUzRr06tvePsxL+Mp0FddvuU7zzj+04Rzj HhblLyuOehHeL9m9XeJhqjGnaTsYquqTSl6XwYA737Efyk7SmHLuZzMgw33fSCqmTy lQ76ht3WJfuycxtfLE8s42RPDndBZN0X94GI1oHU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Wan Jiabing , Sunil Goutham , Herbert Xu , Sasha Levin Subject: [PATCH 5.17 0856/1126] hwrng: cavium - fix NULL but dereferenced coccicheck error Date: Tue, 5 Apr 2022 09:26:43 +0200 Message-Id: <20220405070432.668353094@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070407.513532867@linuxfoundation.org> References: <20220405070407.513532867@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Wan Jiabing [ Upstream commit e6205ad58a7ac194abfb33897585b38687d797fa ] Fix following coccicheck warning: ./drivers/char/hw_random/cavium-rng-vf.c:182:17-20: ERROR: pdev is NULL but dereferenced. Signed-off-by: Wan Jiabing Reviewed-by: Sunil Goutham Signed-off-by: Herbert Xu Signed-off-by: Sasha Levin --- drivers/char/hw_random/cavium-rng-vf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/char/hw_random/cavium-rng-vf.c b/drivers/char/hw_random/cavium-rng-vf.c index 6f66919652bf..7c55f4cf4a8b 100644 --- a/drivers/char/hw_random/cavium-rng-vf.c +++ b/drivers/char/hw_random/cavium-rng-vf.c @@ -179,7 +179,7 @@ static int cavium_map_pf_regs(struct cavium_rng *rng) pdev = pci_get_device(PCI_VENDOR_ID_CAVIUM, PCI_DEVID_CAVIUM_RNG_PF, NULL); if (!pdev) { - dev_err(&pdev->dev, "Cannot find RNG PF device\n"); + pr_err("Cannot find RNG PF device\n"); return -EIO; }