From patchwork Fri Sep 21 07:29:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 10609239 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 776DC157B for ; Fri, 21 Sep 2018 07:48:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 67CE12D8C6 for ; Fri, 21 Sep 2018 07:48:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5BD8B2D8D0; Fri, 21 Sep 2018 07:48:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A51472D8CD for ; Fri, 21 Sep 2018 07:48:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=/+1Tv2CThbK9LQSwtUSMFNqkF5HIyzBheAFOHuFADjI=; b=KE5SEtwI1oTKC79db3E64Xkw4y 0pohw7fteoQj26Bh5wGCBY7+nnlzLDZCAY+F5PqmsvDF4Tu7qGmv7gxD7MM4ZRs8SjZzzydJKG9EP 85apFbwSA+owrTUmNLyKGe0gHn4psSrjlaf6olBGdh5IyIgS93fYJMD9GYqL2j1eisC7ZdSNvMS8N eme+jLO+2z26KacmlfNUEKFdtSnAH1sbKOdakATgV3+lKdKHcDtcxN3hdAo27qZ5+TQ4/wEYQV+wL V1P47QhfH1fXVxJooubLBWuO2zLAdhXV8NGvIb0ch7GnEySGpBIV6nzvtnOR3iIm+qZYf9Ei4OPo6 ACc/k1vQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1g3GAv-0001zM-81; Fri, 21 Sep 2018 07:48:29 +0000 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g3Fsj-000683-3e for linux-arm-kernel@lists.infradead.org; Fri, 21 Sep 2018 07:29:47 +0000 Received: by mail-wm1-x342.google.com with SMTP id q8-v6so2035897wmq.4 for ; Fri, 21 Sep 2018 00:29:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=7pNB/YkN9hno7KdXunbmQOYsXKCGrUI9TMuetzklSpo=; b=e+TNNLb3r0E+A+rjJohde9ukPt4XsdbaYNspA8fLg1x7J285Fg2XWo8/NGkqVaCWuv MS4ARjZy/MBbOvAHzEG6a5fS8LVda1DzH4Fie857AGtDztGUJEAR1uLLLpSXWNUlJkng wRyWNL06Sk9VVgLHPOaXXqsXH5btz959Ke3t0oEGwI4gAx6oi3J/tOdM5IMp6VOWsxOv KRX6i324o0q2jozQDph3b/lvJE7ABxysJ385tzC2kzVh+VcuDczjQRP+5pigWYS02xBC badCseLVISinBgRzE6gZ1OC/acZbu9osg0x0DwsDbaS2SUEGP106ioIh9ko44DAnJXzB M6fw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=7pNB/YkN9hno7KdXunbmQOYsXKCGrUI9TMuetzklSpo=; b=O+Sv74s52iYABy+oiqD+ALHVxW0Dk0TaF/UA725Qz81M+qNrN66/1Z9pVwpknkyCVM 1Re02jxTQ4z+C66YQp+dpo0otTY1z4Eh5wN1qlE0/VG1aolhZ5wz6+p8ZHUNgLjTCNBp 2Ij80naBL8Veo46MpVtlnaBP/L0EMtkWTtx66I4d65EHais4xIqUr2K1GXCbBcR7i0xV 0nzixdy9SXcINzmKQCiceu1oLuwo/zom/ZAMj65y/WgZFLPxeurXS2SoVlNAbb0Ave3J Y9JPZyNEYy7j/9EyKl8DnhOhWxGQL0yKdxOovx9CLY8YkrjznoWXwjOH35KhMsGat6MX PWuA== X-Gm-Message-State: APzg51A21sUNvzRsINI9wX2WIjcT7QY/MxW4Kz35E731v/fEqrfpyU4L +i6HlnrHiy4DH/3ZvWug6VvgtBpWtKE= X-Google-Smtp-Source: ANB0VdZOPAkkhry5s7XS9BMeBWEjzcYT1eW4RHLwems3GiFvysccgYweRBEimNI439E7/4sYKecSkg== X-Received: by 2002:a1c:4d09:: with SMTP id o9-v6mr6166328wmh.134.1537514976009; Fri, 21 Sep 2018 00:29:36 -0700 (PDT) Received: from brgl-bgdev.home ([2a01:cb1d:af:5b00:e837:b8d5:48c1:571b]) by smtp.gmail.com with ESMTPSA id d18-v6sm2841597wmb.33.2018.09.21.00.29.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 21 Sep 2018 00:29:35 -0700 (PDT) From: Bartosz Golaszewski To: Srinivas Kandagatla , "David S . Miller" , Mauro Carvalho Chehab , Greg Kroah-Hartman , Andrew Morton , Arnd Bergmann , Jonathan Corbet , Sekhar Nori , Kevin Hilman , David Lechner , Boris Brezillon , Andrew Lunn , Alban Bedel , Maxime Ripard , Chen-Yu Tsai Subject: [PATCH v5 07/22] nvmem: sunxi_sid: return -ENOMEM if kzalloc() fails Date: Fri, 21 Sep 2018 09:29:06 +0200 Message-Id: <20180921072921.19387-8-brgl@bgdev.pl> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180921072921.19387-1-brgl@bgdev.pl> References: <20180921072921.19387-1-brgl@bgdev.pl> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180921_002941_226635_52BD2D48 X-CRM114-Status: GOOD ( 15.11 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bartosz Golaszewski , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Bartosz Golaszewski The driver currently returns -EINVAL if kzalloc() fails in probe(). Change it to -ENOMEM as it should be. Signed-off-by: Bartosz Golaszewski --- drivers/nvmem/sunxi_sid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/nvmem/sunxi_sid.c b/drivers/nvmem/sunxi_sid.c index d020f89248fd..4d0b7e72aa2e 100644 --- a/drivers/nvmem/sunxi_sid.c +++ b/drivers/nvmem/sunxi_sid.c @@ -187,7 +187,7 @@ static int sunxi_sid_probe(struct platform_device *pdev) randomness = kzalloc(size, GFP_KERNEL); if (!randomness) { - ret = -EINVAL; + ret = -ENOMEM; goto err_unreg_nvmem; }