Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3707499pxb; Mon, 24 Jan 2022 15:58:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJxAC8otw5qzmGLJQenx0DGVyoxMbpSfD357N7IC8XXilKu2q5JQjKmJdhPtC9iMsYoXOOU8 X-Received: by 2002:a63:c151:: with SMTP id p17mr7688598pgi.505.1643068680026; Mon, 24 Jan 2022 15:58:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643068680; cv=none; d=google.com; s=arc-20160816; b=HuJzCrJlijOW6KN0Hbq6ktqnyw0ijaimQMImGkDz1qhxFkRBWtkWmk5IO2Gfgk2B54 7ZbWyAKTCXfkmeu6MjUUtdhhATN97HlBe0eeJtApGzfaKujSN8tWK4dadzd+8Sn/QJ/g yCoUjhQH8ylJ+EPcFP4vc+lMAzJkjjfNnlMWwCYGy/RxC9ubO03ZWT0Xg/DTg8Xu3qAL q0PuH86ATCcHxSOqVdIirKzFDDqn+oklqJSS+drC/0picCq0BHAPLvjV54TuHsSEE25F DxS7u2G17Y1bChDwt8H9SA4nNNVfftavEKJy9ZCxX5beTQydtxDyk2RQe293hm6BFsFY udRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=hnJaKJp12SMYdTY/M+/DjU7Pu7mCa/be9MfqYZzzgjs=; b=QCKpcUnqXfhSwAKHKeiWgorYw+WHfgjM+sAODM6KWj+nI/kkKa9WUhrPEYAQ5VqOCU jjQJoB9hSBMNoKbqFAJJ3lPHspKgsTxPWyaMpoiR8DEHbHI5Z3OvL0V7FUVR4vQ4nECF kKa8QJmpwDrkgwDlDx++LyKQGCL2Cb5IwUsFghdI/6knei7J45bv7cTmQDadxM6+9hdh weLO2LS0ZPv4SrOrl6z7f5/X9xmgQQlSZCGSAQpXdECSFfApLaWOxbUd+EGOz1ZmNXSD hqd/3bdo77Uf/jyFt/50Do/ReKgM4O/Pt4S2y/LjnHfDAAuZAsZftCN0nlYB0GxWKNwS gUjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="ytk/ZkDH"; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u2si16025556plg.50.2022.01.24.15.57.48; Mon, 24 Jan 2022 15:58:00 -0800 (PST) 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=@linuxfoundation.org header.s=korg header.b="ytk/ZkDH"; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2366364AbiAXXwn (ORCPT + 99 others); Mon, 24 Jan 2022 18:52:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1845911AbiAXXNz (ORCPT ); Mon, 24 Jan 2022 18:13:55 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3C482C067A71; Mon, 24 Jan 2022 13:19:59 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id ECA06B80FA1; Mon, 24 Jan 2022 21:19:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 26A26C340E4; Mon, 24 Jan 2022 21:19:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643059196; bh=4oYtsRdFJt3wVgx1zVbt/5z4Ff6BZH8Q/KvrbYGrPQ0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ytk/ZkDHJDbflDRDf2bJqNcFzit6MO/bEePrWIzkrmq+o0tSSGo4eE+wSQYldBVfX aAyfZ398kfEMEOUSf1vg989oK+JD6y0SfEvxdRKhDVnFLdWdzYv7YIwPU5ENTKSgxj p7BxQ+HO1bpB1OEmMfA+i6vzm3k0q8rtgnZ5hBts= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jassi Brar , Dan Carpenter , Sudeep Holla , Jassi Brar , Sasha Levin Subject: [PATCH 5.16 0535/1039] mailbox: pcc: Avoid using the uninitialized variable dev Date: Mon, 24 Jan 2022 19:38:44 +0100 Message-Id: <20220124184143.265198128@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184125.121143506@linuxfoundation.org> References: <20220124184125.121143506@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sudeep Holla [ Upstream commit 960c4056aadcf61983f8eaac159927a052f8cf01 ] Smatch static checker warns: | drivers/mailbox/pcc.c:292 pcc_mbox_request_channel() | error: uninitialized symbol 'dev'. Fix the same by using pr_err instead of dev_err as the variable 'dev' is uninitialized at that stage. Fixes: ce028702ddbc ("mailbox: pcc: Move bulk of PCCT parsing into pcc_mbox_probe") Cc: Jassi Brar Reported-by: Dan Carpenter Signed-off-by: Sudeep Holla Signed-off-by: Jassi Brar Signed-off-by: Sasha Levin --- drivers/mailbox/pcc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mailbox/pcc.c b/drivers/mailbox/pcc.c index 887a3704c12ec..e0a1ab3861f0d 100644 --- a/drivers/mailbox/pcc.c +++ b/drivers/mailbox/pcc.c @@ -289,7 +289,7 @@ pcc_mbox_request_channel(struct mbox_client *cl, int subspace_id) pchan = chan_info + subspace_id; chan = pchan->chan.mchan; if (IS_ERR(chan) || chan->cl) { - dev_err(dev, "Channel not found for idx: %d\n", subspace_id); + pr_err("Channel not found for idx: %d\n", subspace_id); return ERR_PTR(-EBUSY); } dev = chan->mbox->dev; -- 2.34.1