Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp689515rwb; Wed, 26 Jul 2023 00:49:59 -0700 (PDT) X-Google-Smtp-Source: APBJJlHed9VXIbVw/VGxatiSB2OY1bFys+9uYpsJOhOON7LoSsZxd9ZVMmK1nM3q42hw1S5ev5mq X-Received: by 2002:a05:6a20:4425:b0:131:4a64:9977 with SMTP id ce37-20020a056a20442500b001314a649977mr1385209pzb.50.1690357799242; Wed, 26 Jul 2023 00:49:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690357799; cv=none; d=google.com; s=arc-20160816; b=Y8jw7z3W+EptkZpK7YHQxRr9VU3pXVzpNsBlfURQ9jdQEciqs+Jik8zjp8TbDw1Vx8 5D/CfTH6GGDFBB/DBOhGMBoLpQonf43cXHPERZ4TuLoXKnAdbozS6iAzsKk+4JNqIcYt AGisSlMSDMf24eXZJd+RgG53ydyhNcYwJJdVB2EPHzieAHvmSZN1yJQfExb+xVCTorpL Tu36uiys+MJW0nE9G+toN5BNfdUAKFKg7cRHHSdJZvHOj4DP6FP9irWX2/ew1LdwmWPl 8I20QYtYhR3vzTXq1chwA9hbiijihq59jeFn2YRsc10yVONSRYbSzyjX59VmaX5D6L2X tV1w== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=tRnV5JdNqK6jPNuTWUhB/5FsT2nTy7kPcLhJ05f7V50=; fh=K9PejV4D6nNnIBGbiCts/AM1Q05xsLRlC7vT8/dg8I0=; b=Xp4JrCV/7e8UGL6qdIBZMM2s4OBcbgn8UumAqLCJFwJji28GPv38Q4yj5P6E/aa4af KCTygXIbKFgHl9uUa9OgWtwNVlHL+hvMNJZvtp/Yxie1ZPCGYmNU9dlfYh03w9rCi05k 6v5YDJ1GEcM2Uml4Xf98C4atnl9Y8ioM8R78R6fmrn34WxtpurnsDeOPeZTFjOto5/Lx KMNHEAa+wfuxI80SG4S5YNQa0s28kHia4UPDcm/in2fUF0SnUuuli86ZhMyF10qbBcH0 6R8jBAhkKD52IzyST7OzEIMzNpjdX35DClgmGYgd0Z5DfI7rsuo358IkLuoK+ZwEPWSL FRZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=NzKVQUZr; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c13-20020a056a00248d00b006687255a465si13360927pfv.298.2023.07.26.00.49.46; Wed, 26 Jul 2023 00:49:59 -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=@gmail.com header.s=20221208 header.b=NzKVQUZr; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232594AbjGZHhF (ORCPT + 99 others); Wed, 26 Jul 2023 03:37:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60760 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232601AbjGZHgM (ORCPT ); Wed, 26 Jul 2023 03:36:12 -0400 Received: from mail-pg1-x532.google.com (mail-pg1-x532.google.com [IPv6:2607:f8b0:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A826D3C06; Wed, 26 Jul 2023 00:34:50 -0700 (PDT) Received: by mail-pg1-x532.google.com with SMTP id 41be03b00d2f7-55b0e7efb1cso3324024a12.1; Wed, 26 Jul 2023 00:34:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690356890; x=1690961690; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=tRnV5JdNqK6jPNuTWUhB/5FsT2nTy7kPcLhJ05f7V50=; b=NzKVQUZrWEDUPGwG4L+CoCaFCJJhMB3qp1CBS7I0lfQxIHInFbXvLjzxd6CcGSAIMx UYbji16yO2CamWVEoGMpBgWgQr6OV4yZ3DWE/AIdk8L/DDD2q7ZeusVf3LISZ8H0CXa8 OGKGLI6Bhp+wM/g6RiVwa+q23WQ+yTQlxysKN9YBUGACp7e7GVRPLURKESnjcx1nJ5fq DEmehtyA7lolA8OwCGibF9pECUI2lyUnOxTEh7QFUb4oQJ3GRlusSczyY8p24T0LOxvS IOa7OdBcEwy28ODFQNkPKCt0FBZNETXWKgEaiilD8EljeUvp4n0wb4p561Wy+pnXem7U 6oOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690356890; x=1690961690; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tRnV5JdNqK6jPNuTWUhB/5FsT2nTy7kPcLhJ05f7V50=; b=Z5Nd7sXg2aXZGAB/aKp92ZeB2S76TY01juZSS2WbWAbosUqx6I/uWx60kvIXMiLJXi d2YiC48chAoH3S7Xp5qOpzU/Di0w8FiTTlqAr8oewlmtH3DnRwatpuNalHlRscbRao2a 2lUwBi49TYeEFfigjVCgqQ1Pb7LZ01ewuR0f4bHYN/7ALuNEU4xnH5CWXsDQlZtVkq41 F3bWDjVHv80aUntyZTGLai4qtepZ02AyD40tB23Iyt0mPVOfHKyFqgHQmG1/Yc1eEeJK 64dkpnJDgs6uXZcIS6sBLzF08ccYpw1BDSBL2TONChdA2+y520Gd/E8qtBmkA7+Q6XzV DtoA== X-Gm-Message-State: ABy/qLb3gOZWjvabigIuMAU0DQUfkpmO+vyKqqzxSHhKN7qBeSKq8MrA 85TsR4i6NX4LTW0nid7LMT9GZ9cZvi0= X-Received: by 2002:a17:90a:6344:b0:268:400:ecef with SMTP id v4-20020a17090a634400b002680400ecefmr982916pjs.45.1690356889861; Wed, 26 Jul 2023 00:34:49 -0700 (PDT) Received: from cxl-test.. ([103.181.222.211]) by smtp.gmail.com with ESMTPSA id hi16-20020a17090b30d000b0025be7b69d73sm692301pjb.12.2023.07.26.00.34.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Jul 2023 00:34:49 -0700 (PDT) From: Raghu Halharvi To: linux-cxl@vger.kernel.org, Alison Schofield , raghuhack78@gmail.com, ira.weiny@intel.com, bwidawsk@kernel.org, dan.j.williams@intel.com, vishal.l.verma@intel.com Cc: linux-kernel@vger.kernel.org, Dave Jiang Subject: [PATCH v7 1/2] cxl/mbox: Remove redundant dev_err() after failed mem alloc Date: Wed, 26 Jul 2023 07:34:20 +0000 Message-Id: <20230726073421.2452-2-raghuhack78@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230726073421.2452-1-raghuhack78@gmail.com> References: <20230726073421.2452-1-raghuhack78@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,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 Issue found with checkpatch A return of errno should be good enough if the memory allocation fails, the error message here is redundant as per the coding style, removing it. Signed-off-by: Raghu Halharvi Reviewed-by: Vishal Verma Reviewed-by: Dave Jiang Reviewed-by: Ira Weiny --- drivers/cxl/core/mbox.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/cxl/core/mbox.c b/drivers/cxl/core/mbox.c index d6d067fbee97..af7f37cea871 100644 --- a/drivers/cxl/core/mbox.c +++ b/drivers/cxl/core/mbox.c @@ -1325,10 +1325,8 @@ struct cxl_memdev_state *cxl_memdev_state_create(struct device *dev) struct cxl_memdev_state *mds; mds = devm_kzalloc(dev, sizeof(*mds), GFP_KERNEL); - if (!mds) { - dev_err(dev, "No memory available\n"); + if (!mds) return ERR_PTR(-ENOMEM); - } mutex_init(&mds->mbox_mutex); mutex_init(&mds->event.log_lock); -- 2.39.2