From patchwork Tue Oct 30 10:22:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 10661269 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 F101113A4 for ; Tue, 30 Oct 2018 16:17:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DB5502876B for ; Tue, 30 Oct 2018 16:17:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CF2A329809; Tue, 30 Oct 2018 16:17:04 +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 892D72876B for ; Tue, 30 Oct 2018 16:17:04 +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=rBvkH2Tq0ZSbooo61/xI7WNgR2lJnuoovpurrrVri4Y=; b=Ca0K9jFx1e40yn0v6YTzy2eBVh Va3RKlJ6a+oSQKbvtee6l1l2L+7++MNNbPjehUwCG+RY2n7AT+87UaGHFKYdjZztX1a6TGC2RGegN j3wVEHw/RvymHka9v/kLdOIAZQKMHW2S9sdAI3hz83cUYCH5GkQ/r4L+MH2Te7kKSKvWa69tKDWMh Wmzb4bzWw6hsxfcHZlMoenCBeu9QMe3YuRBmsEIbKD640fLdRwpyHnBbQN7cH9CNrVS+9F5i4Uz+x z0Z8vLqnZ8lzn0bSoPrfGNH8cTovajX+2NUXW4UO4QNPn1tUtrmsvK4gJcV9H5ZFXlPi1H3SeRFnG d8XYJJmQ==; 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 1gHWhT-0003GU-FI; Tue, 30 Oct 2018 16:17:03 +0000 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gHWAw-0000WK-DE for linux-amlogic@lists.infradead.org; Tue, 30 Oct 2018 15:43:32 +0000 Received: by mail-wr1-x444.google.com with SMTP id y16so13132418wrw.3 for ; Tue, 30 Oct 2018 08:43:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ygrPMk+pJcXRHcdBwiVFBHzojOA9Y2YhpU+L53lNZo8=; b=toLJdzQXZuWeQ41ePJRpCYzE1Y1Kkqt3wzv1EeS2IEaQLPs02n22JxHgeb4YgnQbt1 wZPoG0YdrhFQS+Ea+on8EQV6AsiDL7Pqq83JaDSvLTzYe1kzZU/xoYCf+Zt7S88cG/ZX IHHJ8HWTIOcs/L8PUqryPG3vjyvgtu5GIsmTwvuBOADxK7ocW476OsheVEsP4TIF/lZC LgpvOa//TBh5SPzs9pQ+2auyU2A0f6kOIVCSSCxSkXq/wjkWgjBB7PdD5buGGia1kwT2 e3U2Xz0HPvZbL/HPpHshj5QiWrBC4OBtD1PMIAZdK8fGMnsFWtvXjozYpqQO/w4Aq/fe yyXQ== 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=ygrPMk+pJcXRHcdBwiVFBHzojOA9Y2YhpU+L53lNZo8=; b=r1xWRW7lHgKoo8t42ZvsH5TBGjvykNxZnrCCKUwRN6IPbAkSXDIEDKUnweK4SUABQH dzvvxsmf3MfSLbIq+TcL8mvqM5VM2Q+KhnnuM5OxK9rYLVtYIENDCMu2hPVloV9O8lZU J4TGFAz80h5iuGB2NQQtzo1MmjQf9c7gLo+iSpxAl/mOmVnB5F/18nQ1if92HMfV9CSQ zShqDnMv+abiet2DKvVLNhB+ODSrlTmwHx9vY5nSpduOM5BYM9+uyMvWzDl6GUT9C3xx +XJsCtlHpkel7VLOHO20u1jy9aGeeUYv3PEXfKDEzRcNJH7YyBSK9Pn+oMgYUhVHuPBr YCjQ== X-Gm-Message-State: AGRZ1gJnkyVxaGq0SdlDsjRNq4RnBU0yFjT5dHtFsphWS2FybgJPVEGH LPqJA+Z/QJKPxRhbytgyWfXUvKBSEy8= X-Google-Smtp-Source: AJdET5cTpLf/6aUDl7mcVpuWwPuGLiWk3ee47vhlyMUW3k1KW2wHmSPuUi+TOnT/mvhMo0rFmhW2WQ== X-Received: by 2002:adf:dc07:: with SMTP id t7-v6mr17115982wri.107.1540894959698; Tue, 30 Oct 2018 03:22:39 -0700 (PDT) Received: from boomer.baylibre.local ([90.63.244.31]) by smtp.googlemail.com with ESMTPSA id i204-v6sm26638614wmd.28.2018.10.30.03.22.38 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 30 Oct 2018 03:22:39 -0700 (PDT) From: Jerome Brunet To: Srinivas Kandagatla , Kevin Hilman , Carlo Caione Subject: [PATCH 1/4] nvmem: meson-efuse: add error message on user_max failure. Date: Tue, 30 Oct 2018 11:22:28 +0100 Message-Id: <20181030102231.4851-2-jbrunet@baylibre.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20181030102231.4851-1-jbrunet@baylibre.com> References: <20181030102231.4851-1-jbrunet@baylibre.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181030_084326_491364_4CB08131 X-CRM114-Status: GOOD ( 10.82 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-amlogic@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Jerome Brunet MIME-Version: 1.0 Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Add an explicit error message when SM_EFUSE_USER_MAX command fails Signed-off-by: Jerome Brunet --- drivers/nvmem/meson-efuse.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/nvmem/meson-efuse.c b/drivers/nvmem/meson-efuse.c index d769840d1e18..40b9df1d030d 100644 --- a/drivers/nvmem/meson-efuse.c +++ b/drivers/nvmem/meson-efuse.c @@ -48,8 +48,10 @@ static int meson_efuse_probe(struct platform_device *pdev) struct nvmem_config *econfig; unsigned int size; - if (meson_sm_call(SM_EFUSE_USER_MAX, &size, 0, 0, 0, 0, 0) < 0) + if (meson_sm_call(SM_EFUSE_USER_MAX, &size, 0, 0, 0, 0, 0) < 0) { + dev_err(dev, "failed to get max user"); return -EINVAL; + } econfig = devm_kzalloc(dev, sizeof(*econfig), GFP_KERNEL); if (!econfig)