Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp957773pxv; Fri, 25 Jun 2021 02:09:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy+ZKaZgnG0Jdj/ROFyNSrvIn5VED8qtWvCswsVJeOUJlsxoS7VOIwR5yIfCXnFN7eAypoc X-Received: by 2002:a17:907:387:: with SMTP id ss7mr10008928ejb.60.1624612193448; Fri, 25 Jun 2021 02:09:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624612193; cv=none; d=google.com; s=arc-20160816; b=bhWozL+WbYCfkEnkvgKwhlZTquzwYSxLXICneDBObBwus1HaxzMA99IUNfQP+xNP9I ll4lrxwV6mL72FCnd++0eJxySMrn7V5pz0Za5u2pAFnXk/Pe4PqKwxRR3RC3pfn8Xn1A ocFVHnDJ9E21IKjha7mrcEvD2uBcKHVi/83HihKXzh6nYz8b39oFqYP3eVWIDA/e1VR0 yU5F1SJPZraB18500/o2lV1eFgs1E4xkmp0sXTOhnrrqT0iu554L0VO4s2xo1+t8DJe5 1PohwNGas28Bq7SPYU8wuGKUuX+ZbTG3shHyswbaRWfQ4YQ4g35icVsNNM/k6qpMYLAm tQ8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=GzN8sulh1p++sqTOUCU0hTMIvqE10brFzOlh2ZxH+ac=; b=GJYu1er9xhHowfjWD4TzjwkxjkMIqExuYX0bk6lwNu5wShr0E5w0RmPDA1d0YVixm6 aEqYlKtiLpJSyra8iaAworeyjJrZmmIZsCNQFiuRkjHaevesa6/G/7LSnKnKdzFg1uHx YgpgnTpQvZux2zrvBxiKG9X/p2fXFXV61ytAO5NF6J9fNHo5Qm21k0X7mOnmcMs2BH+h 8J6m+HkPDWBsSb0Yse5xAtmQ/pgCReFcyzoRpZb/lieBh3ffnMA1Cx+QnHjgExW60JpA zGntx17hGvFBdwKpbyZs7clw3yGNzmr2OsT4FXpsIjxq7D7C7XPTjYsDIuiGCAznwdk2 C/yg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PI8vE6yP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 6si5477270ejq.442.2021.06.25.02.09.30; Fri, 25 Jun 2021 02:09:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PI8vE6yP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231266AbhFYJIX (ORCPT + 99 others); Fri, 25 Jun 2021 05:08:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:58632 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231273AbhFYJIU (ORCPT ); Fri, 25 Jun 2021 05:08:20 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3F42B61429; Fri, 25 Jun 2021 09:06:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624611960; bh=JRVtn2LF05O4zsE0yUfn3O6+raSRPmcoBZK9SlvE3Ek=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=PI8vE6yPun5p4JI5lqgqmoj6wFcIKcxACiN0n0/ZqHEgn94A8GTyrSmQiOucWmEem wagx0jY9FU0oNSkLNbPC59J3f7u8E3D6Jia9fiaWsFS2oe3ZnPGQDWo1KHjjl5qvlc QHTnZT1TqLP06ybaXUpfI1KcDzW3NwX3ceo4GnpypoPjF56tWZ9m+yXl1xNcSgePpE psFHRxRdPMIWawB6OsvISLD5D3L2lTSKPAeO2gsKU/D+S22vIwwjmyOMe90lsAqKVw pc+sL92BFmuOOpfHsfYX4YZQF9Xx7jx0T5fEw10EXx2yD5eeqX19DPiszNhtvyWdKm OS90IuLCsK5mQ== Received: by mail-ed1-f42.google.com with SMTP id r7so12379523edv.12; Fri, 25 Jun 2021 02:06:00 -0700 (PDT) X-Gm-Message-State: AOAM531SwGPG7A9l+hRM1hcHWOeK5IZcnOgA85fZohrP85beCj2sELbq FqXQ0JfOM/jmlw3EK/A30NjErcV4riiqbpbFKA== X-Received: by 2002:a05:6402:4cf:: with SMTP id n15mr13597628edw.162.1624611958809; Fri, 25 Jun 2021 02:05:58 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Chun-Kuang Hu Date: Fri, 25 Jun 2021 17:05:48 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] mailbox: mtk-cmdq: Fix uninitialized variable in cmdq_mbox_flush() To: Dan Carpenter Cc: Jassi Brar , Matthias Brugger , Yongqiang Niu , Chun-Kuang Hu , linux-kernel , Linux ARM , "moderated list:ARM/Mediatek SoC support" , kernel-janitors@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Dan: Dan Carpenter =E6=96=BC 2021=E5=B9=B46=E6=9C=882= 2=E6=97=A5 =E9=80=B1=E4=BA=8C =E4=B8=8B=E5=8D=889:09=E5=AF=AB=E9=81=93=EF= =BC=9A > > The "cb" pointer needs to be initialized before can assign > "data.data =3D cb->data;". Reviewed-by: Chun-Kuang Hu > > Fixes: 4a3cb0303984 ("mailbox: mtk-cmdq: Use mailbox rx_callback") > Signed-off-by: Dan Carpenter > --- > drivers/mailbox/mtk-cmdq-mailbox.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/mailbox/mtk-cmdq-mailbox.c b/drivers/mailbox/mtk-cmd= q-mailbox.c > index 301e65b9527a..67a42b514429 100644 > --- a/drivers/mailbox/mtk-cmdq-mailbox.c > +++ b/drivers/mailbox/mtk-cmdq-mailbox.c > @@ -455,10 +455,10 @@ static int cmdq_mbox_flush(struct mbox_chan *chan, = unsigned long timeout) > > list_for_each_entry_safe(task, tmp, &thread->task_busy_list, > list_entry) { > + cb =3D &task->pkt->async_cb; > data.sta =3D -ECONNABORTED; > data.data =3D cb->data; > data.pkt =3D task->pkt; > - cb =3D &task->pkt->async_cb; > if (cb->cb) > cb->cb(data); > > -- > 2.30.2 >