From patchwork Tue Oct 31 08:59:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 13441278 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EABF8C4332F for ; Tue, 31 Oct 2023 09:00:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Subject:Cc:To: From:Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=jMF3W700TqIWqbsBv+Om5MQuCii3pBFygwGyhpVHPjQ=; b=wizbisE/Pbb+v/ 3Xklz9KXfWtYC6H3NxhcSmMp0u8BzTE1h2SM6UVV1FA63tgme0F0DubS+uWkPLuEIDtIHmWNvIyF+ HuUvgdJWaXGjBjes3EsOSP9pWfsGFwMg5O0olwKocpSL9ToQimWGngvNmzFaUvPEkDDvD8q5qcBkT eI1GkNE3gsbQ8N2GQbGNWxnW5ELz+YzXNH0vebptOKSlClPtD9isrBfuI6oDLToPs9lcdLjFs8Sux i/K7yZoBijK2QjmQ70yjRDk1MUyXYkxIgOTOeH0YA6YPaVN1/TbLFfS8LAkXjzuPO2WDL0jGqltvG BG5B+J9nu3RKWOZL8Nug==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qxkbC-004pKL-25; Tue, 31 Oct 2023 08:59:46 +0000 Received: from mail-lf1-x12b.google.com ([2a00:1450:4864:20::12b]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qxkb9-004pIs-1g for linux-arm-kernel@lists.infradead.org; Tue, 31 Oct 2023 08:59:44 +0000 Received: by mail-lf1-x12b.google.com with SMTP id 2adb3069b0e04-50797cf5b69so7458652e87.2 for ; Tue, 31 Oct 2023 01:59:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698742778; x=1699347578; darn=lists.infradead.org; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=tNOnxQseUn+sdzcn++tRPmK5DAb/ytwQ21KP2ZD3yF8=; b=r0pgVnpUnvMl0tLM2OrOcutjQS8fxWwKeL0jtRFWID0Hussim5dMlKcSQEuNpRBIj6 J+pCbiJGarxfWy371+e2O2wvDL6A1YZZCpT810Ho2vjNO3axlhZN97/QGshDXicxZvcz 9L6TeEo94kldN27xVS3LL0FgxI01IWHwqIFfBai/EJ8Z6yLA390izN2J2bOxNkC/NcAJ fr3c5qyz+s6BJ99j7+Zq2PwkKwUFK9IbcJAqzDvpzVwJygCVVA8Oq3mNgGTT0rJfD6lv uqAxouu7+e94ar11O85I8j4w3+INMgfHJMLGzXv1r8evj20bP/4emmEgqp/d81OVqJvk IR7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698742778; x=1699347578; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=tNOnxQseUn+sdzcn++tRPmK5DAb/ytwQ21KP2ZD3yF8=; b=ophCPERko8nYpndtJmAiy3UG4iuzca2P4Y9Y/wbPnsPTU/dAjjez7sxmN2tQ3uWgDC yExW4vECNk/UjZ0U86D1pFvmvSgXf1TOHs7INqhGYrVkDMxXRxnKITEMMFsxRDXEa3Ip UyX9aGJPWtq9Leoeca6FF6T86AlPAjWlE/NfR+CKGadDVteC7c0zdngRhFa9jLSVqj7u aHxx+G4PBaO5rglITDmEM9uORIr76R22cf5cCs+QcbqLBoYRn0AWMSbBTYvikG0RmWtW yiqGmou7k49sXop2NggmXcg+sDrDlSa7yxSPX8DNTMt0euAamN+4oeTk1Euq8cL2wak7 8xDw== X-Gm-Message-State: AOJu0YwJXCPZiGoCqv6UoqbVnKmwc1zHTX4DW6uRyQ2+BUa4d0mtmhr1 bAn9ZNILAIKgqV9DhOWR09GL3Q== X-Google-Smtp-Source: AGHT+IEz7RBymWwGaxhsiouoy6qvMnV1G4Gz7ZzpjpSRrBR9AiCIjw9PoA1bkmrCkpDthe9/kykFuw== X-Received: by 2002:a05:6512:ea8:b0:507:ac56:66a0 with SMTP id bi40-20020a0565120ea800b00507ac5666a0mr8295514lfb.56.1698742778001; Tue, 31 Oct 2023 01:59:38 -0700 (PDT) Received: from localhost ([102.36.222.112]) by smtp.gmail.com with ESMTPSA id o11-20020a5d684b000000b0032f9a0fe0absm103388wrw.96.2023.10.31.01.59.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Oct 2023 01:59:37 -0700 (PDT) Date: Tue, 31 Oct 2023 11:59:34 +0300 From: Dan Carpenter To: Florian Fainelli Cc: Broadcom internal kernel review list , Greg Kroah-Hartman , Umang Jain , Stefan Wahren , Kieran Bingham , Phil Elwell , linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH] staging: vc04_services: remove unnecessary NULL check Message-ID: <1dff4d9b-d067-4525-95e0-ffdc1185cccd@moroto.mountain> MIME-Version: 1.0 Content-Disposition: inline X-Mailer: git-send-email haha only kidding X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231031_015943_556013_AE1E4713 X-CRM114-Status: GOOD ( 10.82 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org We ensured that "service" as non-NULL in the previous if statement so there is no need to check again here. Signed-off-by: Dan Carpenter Reviewed-by: Umang Jain --- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c index 39b857da2d42..a0117efa2991 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c @@ -2040,8 +2040,7 @@ sync_func(void *v) continue; } - svc_fourcc = service ? service->base.fourcc - : VCHIQ_MAKE_FOURCC('?', '?', '?', '?'); + svc_fourcc = service->base.fourcc; vchiq_log_trace(state->dev, VCHIQ_SYNC, "Rcvd Msg %s from %p4cc s:%d d:%d len:%d",