Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp5362295imm; Tue, 16 Oct 2018 09:06:03 -0700 (PDT) X-Google-Smtp-Source: ACcGV637oYeoeVwQ1uUzrYq5YFJTrlast/YR7hqj4QVA9q3O+tPAVmMNf2VhTvpv/ibLmo4t9aKd X-Received: by 2002:a17:902:850b:: with SMTP id bj11-v6mr22492014plb.107.1539705963858; Tue, 16 Oct 2018 09:06:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539705963; cv=none; d=google.com; s=arc-20160816; b=TlydShmlx3MWQYHRTjKxWuOLzQVwDJnNUCZ/Er8wx3/q2VVX+fqV6h+0w+4e+xjDbc HRTaB+XRyDL2F9weTCJC1331Lj/OjKTksGwui1kr6LgzWYMuLLfmKRYZAxPtsLl6prbN 8k9ZRPCJSSd0UiLv5YcAk/laIy1XWlmu5+tUunwpCTGt5lW52lHssWmN+bCHLjU5Xru9 Jv2FoZtNLKuwejrJMhGUINEDCDTBTOqrWRXYuq61N0zu20kYRUo0NdShOvhYieDMCZIN zTr+1mAbXuaMqk9kGGPop4pQDtq9d0BxIua2BJPKcY9XsrGE/ol5YkGGLcdXH7EkKiMi 44Qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=LkD2TcRoekYSperrpHrRxxhCFIumWI4YHTvnizpHONg=; b=L2af1+jp+TkzLh+yv6mCoAwDrKGEU3cUbNTiQ6JeTM6TaYyD/CmdKpWZgrKsLKjdUc tmyHs2Wh0REwpmSYdmTtUnWLL+DgxEXCfzkOZynq4RZaC2fkX1kkI64eAesAVo0o8/Me ynPUtiUvHRjBnjtWLkR2cRBc5w4A9RhpGFo8chkxC04wBTPyH/IGQpJre900i96PFt38 vSz55bqH+cSozrjTTVwj4TyRCitUkV0PgzrYGHAbXPLxbhXVDP/B+i3Aj9y77ReLWYCe Eh7Vk44nKDrUUj3+TGrRtbfXVckRlO3CqAC1ezR2Ru2O8zUOkP5WCUnfwNdEHS1zQSSo 7+mg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=dZuCaMT9; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n7-v6si14283253pgb.171.2018.10.16.09.05.46; Tue, 16 Oct 2018 09:06:03 -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=@gmail.com header.s=20161025 header.b=dZuCaMT9; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727288AbeJPXyr (ORCPT + 99 others); Tue, 16 Oct 2018 19:54:47 -0400 Received: from mail-oi1-f196.google.com ([209.85.167.196]:38476 "EHLO mail-oi1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726986AbeJPXyr (ORCPT ); Tue, 16 Oct 2018 19:54:47 -0400 Received: by mail-oi1-f196.google.com with SMTP id u197-v6so18498261oif.5; Tue, 16 Oct 2018 09:03:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=LkD2TcRoekYSperrpHrRxxhCFIumWI4YHTvnizpHONg=; b=dZuCaMT92hGP56s6iByfHrELgwB4L8fJiy4TDYHQT5s/AexEvTMnKdG/t4Y9bdMrIn nL3L6/wchkxdM6QnucopsJZTDav0ezlxw+SpO0XxW/SxrqOUR2b8h5vS2njpD3tUr1rR ZYMg4pdyFL//jvC8dfqflfZW6bg9O0v2Gpb26O8wE6gVeYsm8wWuic88hfi+qaoG92Qx UHSHl8WVHKoAld5qE+GLNqJvurB38wsxuqRalEc9aAbFg0S1l6fx8VRIqaL4LsBcRnBh uFkL6yx3C+WVw5O1Ffd6V+3lIEJtid0fNHA+2vSGxG7vh6mXmpNd2XtfsW32KNJY/mIc A68Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=LkD2TcRoekYSperrpHrRxxhCFIumWI4YHTvnizpHONg=; b=FuiLL3yVvxQZU4pir1y0mqPO0Vk8jvIDlM8NhrLz0fWJCX/pT/s+XJha1chy0WlU7E xpe71BikgloR8krVTnkTOzRXQcUohM0xufImoodVIp+TpnzE4XKTeOsl7GLFBGU8tZdu JSHW54ZaqlUjTQap24cgWAJLCK4V8MnEmIqc4PTIMKAUlGGiTylLVm2SUoADXboCNauR QiXEpwknivb57ACjomp9jlngjPynHn/este30gmcK2k/WSw/7l9wscRj7PLNp0DvsulV bj0bvakQ8B+13q6Iwy7gfumwWHlBoUmkyQAys+WULKGUJXqRqyGynk/VdKQ880uAxl0x xUZw== X-Gm-Message-State: ABuFfohrndrTsSqsp4Ok8CQwRBzarhaBhOI9My4Zn8ZVeHOvc4pufQv6 YMxUPROAIEThqaai6OwNo8qnwrHLx7pNsMwHMHs= X-Received: by 2002:aca:3083:: with SMTP id w125-v6mr12439461oiw.67.1539705820559; Tue, 16 Oct 2018 09:03:40 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Fabio Estevam Date: Tue, 16 Oct 2018 13:03:47 -0300 Message-ID: Subject: Re: [PATCH v3 2/4] crypto: mxs-dcp - Add support for dcp clk To: Leonard Crestez Cc: Shawn Guo , Fabio Estevam , Rob Herring , Marek Vasut , Herbert Xu , Horia Geanta Neag , Franck LENORMAND , Aymen Sghaier , "David S. Miller" , Mark Rutland , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "open list:HARDWARE RANDOM NUMBER GENERATOR CORE" , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , NXP Linux Team , Sascha Hauer , linux-kernel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Leonard, On Tue, Oct 16, 2018 at 12:58 PM Leonard Crestez wrote: > + /* DCP clock is optional, only used on some SOCs */ > + sdcp->dcp_clk = devm_clk_get(dev, "dcp"); > + if (IS_ERR(sdcp->dcp_clk)) { > + if (sdcp->dcp_clk != ERR_PTR(-ENOENT)) > + return PTR_ERR(sdcp->dcp_clk); > + sdcp->dcp_clk = NULL; This dcp_clk assignment to NULL does not seem to be necessary. > + > + ret = clk_prepare_enable(sdcp->dcp_clk); > + if (ret) > + return ret; > > ret = devm_request_irq(dev, dcp_vmi_irq, mxs_dcp_irq, 0, > "dcp-vmi-irq", sdcp); > if (ret) { > dev_err(dev, "Failed to claim DCP VMI IRQ!\n"); In case of subsequent errors you should call clk_disable_unprepare(sdcp->dcp_clk).