From patchwork Wed Feb 22 15:17:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 13149859 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 A956CC636D7 for ; Thu, 23 Feb 2023 04:58:14 +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=5ZmwOA2xbRY87sYKi80APQpByxVN7E/jlHbqp7is2Cs=; b=jPSAuaBxO3pW2p v0R9DIibJFaG7n6TcP0NQTKbHaEOXprW9sAHkhNs39EVJ9TKceJ1S5PQE2EPRlwtXgCujZ/YlFEHM BxRQsWFiesdvQqq26TbPkB883NIZAea1nd9J1iEXK4S8LveLT/iD6P6d0IaVG5b5SGDujIyLjSfBJ Ih1SAjFYQasooeABz566IH7tjk0mjNaKZ/aVP20bBNoQX3nogw/mYv74t7wtD0FzYum0k4AK/IJbU i+FUSqKqsLQ48se2V7Vo4YioJ49l/c1BdsXA7/RUlivyLoTQdN1IE3RTkZu0z6t3/XZ98Qit+WXIQ wbJKngsNzZtyUube9rdQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pV3fT-00F5th-DG; Thu, 23 Feb 2023 04:57:19 +0000 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pV3fQ-00F5sA-EG for linux-arm-kernel@lists.infradead.org; Thu, 23 Feb 2023 04:57:17 +0000 Received: by mail-wr1-x436.google.com with SMTP id j2so9509889wrh.9 for ; Wed, 22 Feb 2023 20:57:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=g7kUpsnawfyg2ZRyIba11uMYTEsMyAFj9I8/zy69niw=; b=d/2ElFcihnD1C6glcD23C7A/SWFZ7ZUBjeiUtTyuB0E/+Yp5Xh6q0DcjtyUtXP6yG4 M97I4pPuipWZK8zaLqtUzOsea2WsNwaFu+y19NOdv/YX/0MgnutgmWQyvR58MfQJy02u ooNcvUdWKBUppLh4o/+TLFrRf82Mcc61GIaXSOpZJFaeGRu+7fGspUq4HN9AFE7/GwUZ 47g0sZLQqfGKtTHF95Za7mVDYU+le/5BVRmO/Tuh96vmXEGc9uh6R84M1fTPCGnxuUQP aoDizM3r9dMMejq/LdfSD8sD3Ol1lbHAfuqXGWNQ3IR/M7zfTyioUrX5ieqhuLz0yJ8l FShg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=g7kUpsnawfyg2ZRyIba11uMYTEsMyAFj9I8/zy69niw=; b=EXBJOZ2v8WqpszmGorFAds/2hrzU5IxjfCTIql2xY9XHqICsfMf+jM5ArJ1KA+ovq+ UrIrpppl9+SGXpzU6GYzv0LvPSTZswPJ4br+sjkdBkFqgXO55icpb0OOI+VfBqY5rA1Y q3lBIp4Ozmd8m96HsPgw2ub7PiCe9MYMF+46GYqCURLqDrwc3nCx7mzQaOVUgpKU8qXW hGGKfSe3TrhUA6a4253hjgyQxl+9ye/x7dyeOzKl/A7GDB8/cTVOnwoJJ6UBkdy84miI TjhjQZlQpqpKuJPHsG+iRRt5y9muhNChOGCb0y1tWYx5RoycxVJ5qXFhoxlnxGKMcZxr fMNA== X-Gm-Message-State: AO0yUKV2CAZHGIbGsbsOSWRS4yd/Al91JVotu98rqLldVG8KIMuZ4CMB /8Porf648twp+8Em7eiNzYs= X-Google-Smtp-Source: AK7set+eYY8DnAFYHh4MQC9XO/j7UocMG1ow7qW/1FSjw5zvCevKuVVESVwmQvGrR9EHEousz00jDg== X-Received: by 2002:a5d:4a06:0:b0:2c7:658:f835 with SMTP id m6-20020a5d4a06000000b002c70658f835mr6595239wrq.33.1677128229538; Wed, 22 Feb 2023 20:57:09 -0800 (PST) Received: from localhost ([102.36.222.112]) by smtp.gmail.com with ESMTPSA id q2-20020adff942000000b002c573778432sm12528180wrr.102.2023.02.22.20.57.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Feb 2023 20:57:09 -0800 (PST) Date: Wed, 22 Feb 2023 18:17:06 +0300 From: Dan Carpenter To: Cristian Marussi Cc: Sudeep Holla , linux-arm-kernel@lists.infradead.org, kernel-janitors@vger.kernel.org Subject: [PATCH] firmware: arm_scmi: return a literal instead of a variable Message-ID: 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-20230222_205716_499097_3E274019 X-CRM114-Status: GOOD ( 13.27 ) 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 In this context "return scmi_dev;" and "return NULL;" are equivalent but it is more readable to return a literal. Signed-off-by: Dan Carpenter Reviewed-by: Cristian Marussi --- drivers/firmware/arm_scmi/bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/firmware/arm_scmi/bus.c b/drivers/firmware/arm_scmi/bus.c index 73140b854b31..ac306ca48b07 100644 --- a/drivers/firmware/arm_scmi/bus.c +++ b/drivers/firmware/arm_scmi/bus.c @@ -436,7 +436,7 @@ struct scmi_device *scmi_device_create(struct device_node *np, /* Nothing to do. */ if (!phead) { mutex_unlock(&scmi_requested_devices_mtx); - return scmi_dev; + return NULL; } /* Walk the list of requested devices for protocol and create them */