From patchwork Fri Sep 21 13:40:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 147277 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp838801ljw; Fri, 21 Sep 2018 06:42:23 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaLKOW790EVHWyuFmTj1GZuYC+YDbVy5JFR+4CWj9dgvtGiH6rUfyPaP/GsL07+0pRzKlTD X-Received: by 2002:a62:51c6:: with SMTP id f189-v6mr46819724pfb.7.1537537343218; Fri, 21 Sep 2018 06:42:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537537343; cv=none; d=google.com; s=arc-20160816; b=OsKXh+AkfRtEf5gUAqHmd3Jmnki+AkX/5lU4UkDdaKVf2oQJE7k01b9sTZP58pU2da yP36rnVVqgSBT5RXlh6XH6qNHTz3zTnn4yVEwctrU6C6vMw4bOT5hp7DQT76Yx3lqH2E LeHS/+dgC8GihxlHswOv8e0UjDenU+5zobKAT/ObpvffrVVs18tUIrtQx7pcuK+BMdiS mM0k66c6VjOT/tTzGYGUHS+765xnu+NiIHBu9HF0WiwFNe9ut0BJumVFUicy4547QIeW bGQ0dNrlVUX98zLRj1LCHHtBBmUQFLoST4EPYLjXkGHArWVMK/7rTvi3IPu7UwC1Srdv bolw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=1WOadb3iuIVom3UaIoauT6I1srE+Zn3wqDVMF0ti348=; b=KVIcM7GcvTfNgQ8jfq41VdhPZs/gCCN9Av+q2P/5CkmksK+qDHX0We4ZqggLtNvE/l 4dzQgErAm4V+Z+bx4lGYMLhWZ1m5BVqIvjml2+n4ViM05RbhfgmesT5RYrd/M+a82btR F67lZbeYXAFtQakkNwIlTpDbScupl5PeEBVUX5pMRAohhIYtsi1o/DE+1fh495Y3pAnw nWZa95o5jmwez00sxwbUedizdp4tDxYHoP2AQ5vI1ESLbs8j/XUuV58CFHcJ1SCVaxew tWPiF4pzq8AjqBweU4N1IQXwA8HSvsPp/I5t7MP3+X5ZJhfcdAwFpJgtWnrRnolCqBTU RhIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ELHuP3Bm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h6-v6si24641803pls.150.2018.09.21.06.42.22; Fri, 21 Sep 2018 06:42:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ELHuP3Bm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390464AbeIUTbQ (ORCPT + 32 others); Fri, 21 Sep 2018 15:31:16 -0400 Received: from mail-it1-f195.google.com ([209.85.166.195]:37140 "EHLO mail-it1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390171AbeIUT3k (ORCPT ); Fri, 21 Sep 2018 15:29:40 -0400 Received: by mail-it1-f195.google.com with SMTP id h20-v6so1931996itf.2 for ; Fri, 21 Sep 2018 06:40:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=1WOadb3iuIVom3UaIoauT6I1srE+Zn3wqDVMF0ti348=; b=ELHuP3BmUjiKqyZgLxnGxM/oKiagySfCrVKhE/rXo2Krw+e4XJwLkxp/n1d8aiXtdY h0iVo2H+8G+nOT8hihm4MHIKfHQy1p8jC60rqAWEf8nOOKZFb4SKv8U2Oh3zUutGBTDl fkdbGKo7SsSxITTcqiN4cKEsSMdZhib1O7Vng= 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=1WOadb3iuIVom3UaIoauT6I1srE+Zn3wqDVMF0ti348=; b=KjhMIPT5kZYghUGhJ68o1QmlRXT078BdMJGN439YT+Ou5GNF8nJBecOC5VAvdiEGwf 03WMk0No8YYWJ1/RwQwfMqcrGjnyAFOdFGxRKJd3WfdrwuGBbBr3Fphpanuxx2js+D0f w8CKn6rBZ+9QNexEZ5qK2WvWvxsQZCuha4e871VYq/WjCkj0MqqZstjyAAYHST2cnNV4 cP2KK4sJTunkLeABJMNQk88/bYtLR3to7ZITkQdoZ7esTZFR1UbcET4tQMyaXjzSIKjs 54ApcO+pwKAljO/HWek3YHDiFJ9uUI3uA9EonMktZcTulUL6fgQEyeP3U/lT/fDuo3R/ qiwA== X-Gm-Message-State: APzg51AvkZWHCJJdy9WnStsCQ8sSgGRI52xjZ+nQ+o4o0uMUVep4tsLE hJlzLk51IptPm4LgNNa0wzW+gw== X-Received: by 2002:a24:d507:: with SMTP id a7-v6mr6054608itg.7.1537537244799; Fri, 21 Sep 2018 06:40:44 -0700 (PDT) Received: from localhost.localdomain ([209.82.80.116]) by smtp.gmail.com with ESMTPSA id c12-v6sm9896298ioq.81.2018.09.21.06.40.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 21 Sep 2018 06:40:44 -0700 (PDT) From: srinivas.kandagatla@linaro.org To: gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, Bartosz Golaszewski , Srinivas Kandagatla Subject: [PATCH 09/26] nvmem: sunxi_sid: return -ENOMEM if kzalloc() fails Date: Fri, 21 Sep 2018 06:40:09 -0700 Message-Id: <20180921134026.4596-10-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20180921134026.4596-1-srinivas.kandagatla@linaro.org> References: <20180921134026.4596-1-srinivas.kandagatla@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Signed-off-by: Srinivas Kandagatla --- drivers/nvmem/sunxi_sid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.19.0 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; }