Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp3688832ybv; Mon, 10 Feb 2020 04:45:00 -0800 (PST) X-Google-Smtp-Source: APXvYqx49kFHCuJeDFMInlSxvdRPn/olIPMvFU5H3JFk3lzWiCZIIxYYrBN6NUQEOOhCT7NIxbbH X-Received: by 2002:a05:6808:b1c:: with SMTP id s28mr720655oij.2.1581338700490; Mon, 10 Feb 2020 04:45:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581338700; cv=none; d=google.com; s=arc-20160816; b=m+6+QdLMzQVqxqLc/FPpAio5+ts7rSd1CrIXYZrjTdiwMML5phsWXyL50OhrxG5esy IiJDHHhaIaJzqNOJNZgdUT/K5NlGHJhEI0+JkdZYiC114vzFqc8jgjWtpx+5+SY73gHq 2uRiTyQYRzi2uhFfPbcWyTCqEj0wY5uz9QjSqkChyGLEpUP8vErOZ4juKWH9Dq+1Vufo wl6PXIM8hl95HVqjdjoo8T1oP8WxOf2aqqUQXWn4i7vTA5Z6hx//MVpPKBOJira8eRzE ipjBSUzUgDL0YtRKY3ryQYcvSeK98HQ3hCb8Qidc1kxecv420+k88ohTF2KKzNau0TVI akoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=fo38eC7HfHcIjOvjADSWkYf3qZU8tvxl5q5dQiEanmk=; b=HUt8JHNozYNqP6lyT0tS3/zd/Zr/YLkHG7UeK/1cRmLLxLNkU69lYyU7/bk2EsjOSn 87qNwjAYDCpvDcqCsIeZyj6dKNmP9x714KfvxPRqARflHCFLoBWk3RPHz3iD3CoGgh/4 d3v3JEYaVkYzXfWOv/GVl+ggaYj6VZmGhwSE3wCz0Cvg7TWQOY0NKRVPVilXi6KCVhXM JlfS4c1kFXEHcQhf8o/rSG3k6VLtAnUCJ70JIlj+/dtwU8LQsb0Jxdw7uLrzwuG1PSqh uYsyvGqRdtdUiJIn67oNHgWOJqwxZBwk/T5iKZaauS9K+VttEEj1ISPuqeU3V0cxv5sr l9ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=gNnAzbck; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i124si127637oif.214.2020.02.10.04.44.48; Mon, 10 Feb 2020 04:45:00 -0800 (PST) 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=@kernel.org header.s=default header.b=gNnAzbck; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730672AbgBJMog (ORCPT + 99 others); Mon, 10 Feb 2020 07:44:36 -0500 Received: from mail.kernel.org ([198.145.29.99]:41150 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728154AbgBJMkj (ORCPT ); Mon, 10 Feb 2020 07:40:39 -0500 Received: from localhost (unknown [209.37.97.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E4AB52173E; Mon, 10 Feb 2020 12:40:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581338439; bh=5QD9YOC95JGAUEOA86RzolZ5SR5kMSDUR274K8u+1o4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gNnAzbckLb5K3bCMF5kRSVYhjWUnLT/SfT3VJLlCW4ByOC59BytdQEiN6CJh3uNay bt0e2VhUqQeUG/1oO+cCTyf25pbnGsFyWO0BcnNwIVn61YIORpO8k5periSDLhUs6x GoCxgQz0Ymbycc55+II3KT50NRK0lkjvqYwLBMfU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Corentin Labbe , Herbert Xu Subject: [PATCH 5.5 175/367] crypto: amlogic - fix removal of module Date: Mon, 10 Feb 2020 04:31:28 -0800 Message-Id: <20200210122440.982219829@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200210122423.695146547@linuxfoundation.org> References: <20200210122423.695146547@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Corentin Labbe commit 24775ac2fe68132d3e0e7cd3a0521ccb1a5d7243 upstream. Removing the driver cause an oops due to the fact we clean an extra channel. Let's give the right index to the cleaning function. Fixes: 48fe583fe541 ("crypto: amlogic - Add crypto accelerator for amlogic GXL") Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu Signed-off-by: Greg Kroah-Hartman --- drivers/crypto/amlogic/amlogic-gxl-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/crypto/amlogic/amlogic-gxl-core.c +++ b/drivers/crypto/amlogic/amlogic-gxl-core.c @@ -289,7 +289,7 @@ static int meson_crypto_probe(struct pla error_alg: meson_unregister_algs(mc); error_flow: - meson_free_chanlist(mc, MAXFLOW); + meson_free_chanlist(mc, MAXFLOW - 1); clk_disable_unprepare(mc->busclk); return err; } @@ -304,7 +304,7 @@ static int meson_crypto_remove(struct pl meson_unregister_algs(mc); - meson_free_chanlist(mc, MAXFLOW); + meson_free_chanlist(mc, MAXFLOW - 1); clk_disable_unprepare(mc->busclk); return 0;