Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp2099636pxm; Fri, 4 Mar 2022 09:21:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJxwBJENioc7vxWLxidZpESVAUKSkTlLjB5hSKBWeTYIN5f4PrQNn4Hbs3JM4nWH3cGLWtIT X-Received: by 2002:a05:6402:2142:b0:413:6531:bd9e with SMTP id bq2-20020a056402214200b004136531bd9emr38042870edb.5.1646414478252; Fri, 04 Mar 2022 09:21:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646414478; cv=none; d=google.com; s=arc-20160816; b=Ylli8rjyJRU4QagdArbjHVqLHXakNwXw6SYtRd6nHHa+aXoD7kFoPe6l+RggQ0rMdS ykP8fQ5nuZPoDgDaJeBymFKvQ6w3bALzLcnCKU0PiZvVJaAvrOgmO8eCQe/6VJoy6Nu8 9vyi1lZC0+jnDv64TVeKwC/rotAnDfHf/4J1/nnMzQOiRldenScUqv9QEu23Aa/7fHqD MZXTfsMy+6fMoxE8VD3qvgzXFKz4KP5OBqVvP6q8gGjg088tfByRamiiado2oo7NkluT DbPWJz59fgtG60yNEzL0BvD+BSJkPJWKchpkPg+d74xCkfKsVpT3IwvcMtDSsdH+Gl7O j4xQ== 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 :message-id:date:subject:to:from:dkim-signature; bh=ZiYRxpOW7H2aZXVGftBTBKxNVAmOlSnEmG+mhO4BaDY=; b=ltEwwT1hO2HGyOU2dcYe5Oi9mUuuECNRMbvIZHlHYGw+HSTwCZXFJ+0Qs98W65IIcs qewpHyTJ4+OG1QAj/fJV3J7LiXCfy5xwpaZoyNnW/TDtu52JsYOHvptcOBdpBcIaQCPB Xm05hKvLAsL+QgGE8dlA5muxMyT2yI+EPCoaFN62BrMfSeSLPYTHr85eIR8WNTThXERR nxCHUPMhQ2HG8kMG1ykidDSd0viYXc7HkpxEF4aFUPQ1zvBS6GkxsvIb06FJOi02Kx5A jtR1xz9TL3YDU5btM19LUjtKVCGe2VZwmkqDKNXJS/pKF06z5VvQB934MFgLwJ3+fCoI f4kg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=NwAAcEmu; 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=canonical.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gt12-20020a1709072d8c00b006da9ef895besi2749489ejc.651.2022.03.04.09.20.53; Fri, 04 Mar 2022 09:21:18 -0800 (PST) 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=@canonical.com header.s=20210705 header.b=NwAAcEmu; 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=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233036AbiCDIYb (ORCPT + 99 others); Fri, 4 Mar 2022 03:24:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48592 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229862AbiCDIYa (ORCPT ); Fri, 4 Mar 2022 03:24:30 -0500 Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3AB9E188A39 for ; Fri, 4 Mar 2022 00:23:43 -0800 (PST) Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 094943F043 for ; Fri, 4 Mar 2022 08:23:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1646382222; bh=ZiYRxpOW7H2aZXVGftBTBKxNVAmOlSnEmG+mhO4BaDY=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=NwAAcEmuSDzo7Nv6REGPbQgtWeW745+OtrP48TsAt3KT0uamFeO0eX/5cpc6yQnH1 0M4cc8fp+C9f+M0mPkYYhmRnmFCzSCUrc/QEd4Oq5WTjKI4vdcfhBo2kjs8hUpFnvJ YVfwtWJxtoV4ovMW902EW1ZocWhkA2hog/pZplpLdrKUFZvAnE358ufSv4GFxwrB1Q +yFnAe1g+WXy8wOxk5LHiJt5Ce47sShqXbFM41zVKd57iRFdE3Cs+gNrHDrGwIxG1d s2pzaLkupSs4G/p82mvN/ATYElYUy5BVsUI/YlvYN8iXr16wN5nmVaamEciAn3wf6W zCy3Ng1kfEOqw== Received: by mail-ed1-f72.google.com with SMTP id h17-20020a05640250d100b004133863d836so4254813edb.0 for ; Fri, 04 Mar 2022 00:23:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=ZiYRxpOW7H2aZXVGftBTBKxNVAmOlSnEmG+mhO4BaDY=; b=u5HIsYudHRUwTBg4r18aNXIEKRopR5PM+kKujkgtWHpcspa9vDLok8m7EB81PpaGBq ER3CaHIDUBlIpgaUXFL3OLr+8sV9aYf+a44wkgkl9kEw9CkubLXUHPran7+cDuAh15Gs OqladYLG8sieTkK1BjlvY7S53n14eY6IZQcjQul4EqxWFLSW1DZFlNvkftVK6j8z7WO6 R3eliXSeKYUMeK8//icvq/KP/0AAfoLqtkYbbxo5rtppqecIOZx2VqkKMYCbaX6XhN90 dyGUva5PzYAWpOUuwoNJjxd7p7oV7j0ks9hPmM3cH2q5T2aLCIzH2kdAn+qDO/8uRSc3 woew== X-Gm-Message-State: AOAM530Jg6OoMvIy7KUSAFtyDHlYRoOuJcOP+1d5xIOWcsjQ02E1DCP7 PwVGwyLAI9W7j71/IEzNRZC7KT06E0w12D20rCPSGW+AWX1hdmMoJ+2/zDdrwVG4LxED34KXpK4 L0U1FfIn9qGp83nyvQtqI4AAjcT2OGJTg/XOVTGia4w== X-Received: by 2002:a05:6402:1747:b0:415:ee04:47e1 with SMTP id v7-20020a056402174700b00415ee0447e1mr4319835edx.229.1646382221559; Fri, 04 Mar 2022 00:23:41 -0800 (PST) X-Received: by 2002:a05:6402:1747:b0:415:ee04:47e1 with SMTP id v7-20020a056402174700b00415ee0447e1mr4319821edx.229.1646382221393; Fri, 04 Mar 2022 00:23:41 -0800 (PST) Received: from localhost.localdomain (xdsl-188-155-181-108.adslplus.ch. [188.155.181.108]) by smtp.gmail.com with ESMTPSA id g2-20020aa7c842000000b0041314b98872sm1786256edt.22.2022.03.04.00.23.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Mar 2022 00:23:40 -0800 (PST) From: Krzysztof Kozlowski To: Santosh Shilimkar , Krzysztof Kozlowski , linux-kernel@vger.kernel.org Subject: [PATCH] memory: emif: remove unneeded ENOMEM error messages Date: Fri, 4 Mar 2022 09:23:39 +0100 Message-Id: <20220304082339.230938-1-krzysztof.kozlowski@canonical.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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 Memory subsystem already prints message about failed memory allocation, there is no need to do it in the drivers. Signed-off-by: Krzysztof Kozlowski --- drivers/memory/emif.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/drivers/memory/emif.c b/drivers/memory/emif.c index 762d0c0f0716..c7ebdabcc7f2 100644 --- a/drivers/memory/emif.c +++ b/drivers/memory/emif.c @@ -1025,10 +1025,8 @@ static struct emif_data *__init_or_module get_device_details( temp = devm_kzalloc(dev, sizeof(*pd), GFP_KERNEL); dev_info = devm_kzalloc(dev, sizeof(*dev_info), GFP_KERNEL); - if (!emif || !pd || !dev_info) { - dev_err(dev, "%s:%d: allocation error\n", __func__, __LINE__); + if (!emif || !pd || !dev_info) goto error; - } memcpy(temp, pd, sizeof(*pd)); pd = temp; @@ -1067,9 +1065,6 @@ static struct emif_data *__init_or_module get_device_details( temp = devm_kzalloc(dev, sizeof(*cust_cfgs), GFP_KERNEL); if (temp) memcpy(temp, cust_cfgs, sizeof(*cust_cfgs)); - else - dev_warn(dev, "%s:%d: allocation error\n", __func__, - __LINE__); pd->custom_configs = temp; } @@ -1084,8 +1079,6 @@ static struct emif_data *__init_or_module get_device_details( memcpy(temp, pd->timings, size); pd->timings = temp; } else { - dev_warn(dev, "%s:%d: allocation error\n", __func__, - __LINE__); get_default_timings(emif); } } else { @@ -1098,8 +1091,6 @@ static struct emif_data *__init_or_module get_device_details( memcpy(temp, pd->min_tck, sizeof(*pd->min_tck)); pd->min_tck = temp; } else { - dev_warn(dev, "%s:%d: allocation error\n", __func__, - __LINE__); pd->min_tck = &lpddr2_jedec_min_tck; } } else { -- 2.32.0