Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp6233434ybv; Wed, 12 Feb 2020 08:23:15 -0800 (PST) X-Google-Smtp-Source: APXvYqw1GvUAzTubcIGDb2uiGcz8NH7yjeQ4PM89DlpFejWKXxDUKngBO2vXDTg/ptdfAv6vdDki X-Received: by 2002:a9d:5d09:: with SMTP id b9mr3568859oti.207.1581524595486; Wed, 12 Feb 2020 08:23:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581524595; cv=none; d=google.com; s=arc-20160816; b=wmCKLT+RVX6E8XGuKgjR5iDGjUDh7tanohbd6x2RBbJVmumZ4mlGrKs5DqTSwK+Awv WcmUYEhPA6Lx1fdyiM1dVD38pxe3MK5WKcPB36apGa9ROM+3jt5mzTtv69lJjRRXxS6L T73KvO441i2HEENJMuLJHM4Z4loc6fNEl6Uak7fd8E/LLpqEeSXxgH6xVoX1ymQqVsA5 k5w7LyWi6lMUTlSaepmgGMmjvv44hPLCyyI4EV8lGAs0xIKbu28OZIO6ibRFRRNDWnq1 yvdI+qoFMSKi3byYw+lHqocZeRts/aqzAHZ11q8zroYxsMeTASa/V1KesYA8bL/zBeCj CdlA== 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=i/S/gu5ls056hur5YDfXFsWlqa/VXA1YVt8W07oi8A0=; b=bEFrglL2Bvg4TtpJwES7y3vdvuwWUEvLzSeUMXxrUfj4wtzufTN32LyDgk4GZqCTGj r/MTdHYbBG//4ig6MflHr2JZiAfCI7nRFCPBKKS12uW8IC+/+fv1JjOCb+BA1xTGk+2a nry76uVVYPOWG8J1zauSKIE8Rt4aOwjJrVJttgZ5jnmNinjklHihMHGlN2D4l9eq/gi4 WlvuCP6hmUE5RExmSJni6bJVmnEnOD6vyA1ytvOZadELohKnMfnabRSIj2fU+72mtxu5 jK3q+cg134qp9xQ+UVmjriZoPzFVZqKbX4+e6PNBtbMRZBLBqnmQxsQkgp9EgtOsfpiR F0hA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="t4Q/rqVY"; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-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 17si425595otv.149.2020.02.12.08.23.02; Wed, 12 Feb 2020 08:23:15 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-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="t4Q/rqVY"; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-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 S1728731AbgBLQW1 (ORCPT + 99 others); Wed, 12 Feb 2020 11:22:27 -0500 Received: from mail-pf1-f196.google.com ([209.85.210.196]:45487 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728708AbgBLQW1 (ORCPT ); Wed, 12 Feb 2020 11:22:27 -0500 Received: by mail-pf1-f196.google.com with SMTP id 2so1461151pfg.12; Wed, 12 Feb 2020 08:22:26 -0800 (PST) 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=i/S/gu5ls056hur5YDfXFsWlqa/VXA1YVt8W07oi8A0=; b=t4Q/rqVY5SzGQA3770fHEw4TUpO31savs1Ccvpjf9zd84waVs3yJM9pfnejClHR1UE Lkp0sns0cE09dZfQRmq0oBofdY/9iVWCF74zdbMQWdFJsibQaCR/Wkpk7VSi5NCMrOTn FesMXEcb+2UEfy27+9j8iysokL7EZwdF07767X/5FXrobZfLI+8TCaTcIPe70Um0JggX qSAcy19J5mp5d1/lU2nLrFTadHzRHzD3f4cQ18i84bdKvjuTVxHi5uvrNXN+xyysxxE3 ZpdgdexrOcsf6Xy54p3acue3hOABe+IBI5+5XfOCRiOmULIb1TFF6cTljQJOB3NDRPp0 ixNg== 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=i/S/gu5ls056hur5YDfXFsWlqa/VXA1YVt8W07oi8A0=; b=iXiImyetsOCpIi7UdS+AzadsCa22PyGGlZPe8/eErvuSqkDhDuqrhpArfNmSoJVrR+ zmaKaWXJzyZdxt6iS+g++Qfob/8MlcTCI6ILTM2fyrgoroJl9u4UaXbXtkS+/MgTgv8b HuYgmUBecjXFpcFLQoUg0mXmsJy62mGNv2tB6fViMp1fv9aYHydGRDIuf69SLbumfxVM 46oR4V/paCEvfNtrPmW9yoBs+9bOdTDPQJtpfHy8Pkq706gGcFaAcZ1uVnE5ZrexQye2 6uoUdipD4vKRsHj5vUYaFrEGkOLQaYJr3oEGxK9hsBYCBYoTp5ithy5i5UIG5KA9bRBw lCuw== X-Gm-Message-State: APjAAAVOOmOERCT0jiqddL9ujbTky35kidzTGRXAe4OUEFK9DHfRZ+Tq f1WG8PxxMJth3Kv7TxWj2wk/OVwSIH8V+VNbqfk= X-Received: by 2002:a63:583:: with SMTP id 125mr9258604pgf.100.1581524546569; Wed, 12 Feb 2020 08:22:26 -0800 (PST) MIME-Version: 1.0 References: <20200128110102.11522-1-martin@kaiser.cx> <20200128110102.11522-2-martin@kaiser.cx> In-Reply-To: <20200128110102.11522-2-martin@kaiser.cx> From: PrasannaKumar Muralidharan Date: Wed, 12 Feb 2020 21:52:15 +0530 Message-ID: Subject: Re: [PATCH 1/6] hwrng: imx-rngc - fix an error path To: Martin Kaiser Cc: Herbert Xu , NXP Linux Team , "open list:HARDWARE RANDOM NUMBER GENERATOR CORE" , linux-arm-kernel@lists.infradead.org, open list , stable@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Hi Martin, On Tue, 28 Jan 2020 at 16:31, Martin Kaiser wrote: > > Make sure that the rngc interrupt is masked if the rngc self test fails. > Self test failure means that probe fails as well. Interrupts should be > masked in this case, regardless of the error. > > Cc: stable@vger.kernel.org > Fixes: 1d5449445bd0 ("hwrng: mx-rngc - add a driver for Freescale RNGC") > Signed-off-by: Martin Kaiser > --- > drivers/char/hw_random/imx-rngc.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/char/hw_random/imx-rngc.c b/drivers/char/hw_random/imx-rngc.c > index 30cf00f8e9a0..0576801944fd 100644 > --- a/drivers/char/hw_random/imx-rngc.c > +++ b/drivers/char/hw_random/imx-rngc.c > @@ -105,8 +105,10 @@ static int imx_rngc_self_test(struct imx_rngc *rngc) > return -ETIMEDOUT; > } > > - if (rngc->err_reg != 0) > + if (rngc->err_reg != 0) { > + imx_rngc_irq_mask_clear(rngc); > return -EIO; > + } > > return 0; > } > -- > 2.20.1 > Looks good to me. You can add Reviewed-by: PrasannaKumar Muralidharan Regards, PrasannaKumar