Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3900278pxb; Mon, 1 Nov 2021 23:58:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxugJyuSVE2qYgFBMzXycLDTRTnhy327Vg+FqUElgY6GA1kFbKtLyQ6lRH42ufGTvYui/u7 X-Received: by 2002:a17:906:3a0e:: with SMTP id z14mr35002697eje.111.1635836301207; Mon, 01 Nov 2021 23:58:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635836301; cv=none; d=google.com; s=arc-20160816; b=lHyBdanokfYpw6/HbZysNjDAAAqgkdTFw3ror8ya3EgLhFeKEiIJPQqAR1uIurPlzd 3v0BelXNT2y3O6p1Dw+IpxSlScOUzdgxAEcz7FVlgvSFk9IzEpYhUdnpepfIfspf7RVg QYdog+Jn2nOb2zXs8b7tejvdTX8i2hGAu7LdDOzf6fM3faGvsNZxjiw/SqsGG0S6r4Er k0sDklHwrx7zzSRsFUWd5ghgf6LfSVqGzc9l1PsXjRbScH2rsZnJz4BC6Yxj8nm5OP1g TNabjwqcU2owsyC3d8kDoLMyCH7vjGCX7PF+2LNeoGRHsl/fM0+p3Tb7y7HvhkkDFXKs ve8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:from:dkim-signature; bh=8TXjaL7KCaMAU54/WTI7E59w5Y6R+WOCrHVuKDe8geQ=; b=FhzfahaKe0UPg/LQ9gJllIECOEbxNNc7ll7JzbDrDDP1xqohXmZYH5KVys/USZuvi5 zY0Kl/s+NCzhjXNMinkKoY5bBRI6GSlrl7WKoE2sioJ4pJJqtt0zkKwr1PfVvVPopBq9 7hwdQFKARP0vpPNLmLBbY74b7yMk+wTc8nCfr7L4FMPM5BOlXEpt6PNlFLOXhVLJJsEP nPQM2o1drWpgJrY+joggErLtc3Vdx3i56KRYrHl3IrahLcZCv+37FSp9U4iYIys4zuc2 Zn2vfWmFtT8xREyfButRpOxUgZzvsKhHSPBbwqllI2FuphctZ+vYSRPfqBQKMJW2BtGm 6+zw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@kernel.org header.s=k20201202 header.b=YpzQGVlw; 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 ee48si15428435edb.425.2021.11.01.23.57.57; Mon, 01 Nov 2021 23:58:21 -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=fail header.i=@kernel.org header.s=k20201202 header.b=YpzQGVlw; 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 S230015AbhKBG5U (ORCPT + 99 others); Tue, 2 Nov 2021 02:57:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:53642 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229505AbhKBG5S (ORCPT ); Tue, 2 Nov 2021 02:57:18 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7266560F58; Tue, 2 Nov 2021 06:54:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1635836084; bh=4Hivgiy714oTIsz9VsX8ACzEnLl+2pVgbQlZi2tljEM=; h=From:To:Cc:Subject:Date:From; b=YpzQGVlwJA2B2PgR7pBCo+JLvRS3+zUHmpxiWGFQo5bTkvHjetAzfkHylO8mTVmS1 DKHgFdTs20uZ7Q3u4PnqRARRMuFBpKIlazeEuI05kgiQ//u6rEGvPPjiv0mX5B12Pl u5j/2uwRuo2Uz0EKwC3HI71OgaywOC8XpuprojLxdEaFmW0pGHHujeRZKddQBW6fcx xzl8lFuW7BKv2u2Fyx5+mdStr44l2w+mAnjsUTY0V6qj1tolpUC+BsBZRtos3mN5X4 JHZrygrOUDzwKwavlZb5NY6au6I6A6nUfyPB80r/wW/XiC5vcnTgFyVdJUTVlu/f/v NYfqpY8eg3weg== Received: by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1mhngw-004TUF-8Z; Tue, 02 Nov 2021 06:54:42 +0000 From: Mauro Carvalho Chehab Cc: linuxarm@huawei.com, mauro.chehab@huawei.com, Mauro Carvalho Chehab , Aditya Srivastava , Aline Santana Cordeiro , Baokun Li , Greg Kroah-Hartman , Kaixu Xia , Mauro Carvalho Chehab , Sakari Ailus , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-staging@lists.linux.dev, Andy Shevchenko Subject: [PATCH] media: atomisp: add a default case at __get_frame_info() Date: Tue, 2 Nov 2021 06:54:41 +0000 Message-Id: <175426fbef213fe76e3bdd60a64ee03f2a0dd3af.1635836077.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: Mauro Carvalho Chehab To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The switch() logic there misses a break and a default case. That makes it more prone to problems as the code change. Suggested-by: Andy Shevchenko Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/media/atomisp/pci/atomisp_compat_css20.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/media/atomisp/pci/atomisp_compat_css20.c b/drivers/staging/media/atomisp/pci/atomisp_compat_css20.c index 1309855bb6c8..a8972b231e06 100644 --- a/drivers/staging/media/atomisp/pci/atomisp_compat_css20.c +++ b/drivers/staging/media/atomisp/pci/atomisp_compat_css20.c @@ -2691,9 +2691,11 @@ static int __get_frame_info(struct atomisp_sub_device *asd, *info = p_info.output_info[1]; dev_dbg(isp->dev, "getting second main frame info.\n"); break; + default: case ATOMISP_CSS_RAW_FRAME: *info = p_info.raw_output_info; dev_dbg(isp->dev, "getting raw frame info.\n"); + break; } dev_dbg(isp->dev, "get frame info: w=%d, h=%d, num_invalid_frames %d.\n", info->res.width, info->res.height, p_info.num_invalid_frames); -- 2.31.1