From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DE621C4332F for ; Thu, 10 Nov 2022 16:28:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231630AbiKJQ2O (ORCPT ); Thu, 10 Nov 2022 11:28:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230266AbiKJQ2J (ORCPT ); Thu, 10 Nov 2022 11:28:09 -0500 Received: from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com [IPv6:2607:f8b0:4864:20::1031]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D4F2720982 for ; Thu, 10 Nov 2022 08:28:07 -0800 (PST) Received: by mail-pj1-x1031.google.com with SMTP id h14so1928525pjv.4 for ; Thu, 10 Nov 2022 08:28:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-disposition:mime-version:message-id:subject:cc:to:date:from :from:to:cc:subject:date:message-id:reply-to; bh=hYhq/mBEGTZpGCDyMim5fTg3vaVPNZnQvgxcn4u7bSI=; b=Prhwc6DCeW+0r6L7UoZ+ItiN/aHRF2e9MAvxqsVz4KA4QswyP7GwKrb6HYRa60cfp0 +b0MxtYATc5xgmr9p37QbuXf1l1p32jRAdP2hwXG5wR3VotgwUNvgeLJODH08x8Nwtk9 B/D1bmU0y/wRl84XUzPlfkZqAIIHJTyieTUA4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-disposition:mime-version:message-id:subject:cc:to:date:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=hYhq/mBEGTZpGCDyMim5fTg3vaVPNZnQvgxcn4u7bSI=; b=sQSsDHrwolhy2A/Qbkhvf1VfhI9ctF+cp6vLBhMPIYbvtz/3vfHxe3SLafZVYr133o pn+10HtL699+pj8BLqGdLDMtJn5uskVLKWsa6dsruXUBFddhAPS+iDjcaS2+mYUEpRzz 6JotUEaLlU9lbpxmflH/GBG88K1cemTRyUBmxP6u3CK6llpfjRPlj/DRNaANmfFHt88k 7mZUwfyNuONBNE8uX8whpJVcT9rKmCxeMA5RTF4uwcletcXFwHPdHkQp6ua2tSWpLwe5 /1ZNVzmXEkDnEihfMRvkCMIcztvJaSYDzBsBtM+RvcwVREZ/FaJgbH3pCK+fuxU7MSHz U07A== X-Gm-Message-State: ANoB5pmtDeNDYVaPV1/c74Xrj2IMUZl5x6oRNPdjCLoy+6d3TE7oV6e+ r9rDgjl9m/URPteTRgDFbJq+NA== X-Google-Smtp-Source: AA0mqf7tUEF/WoEOICY6ADSUX7ZpJwwgEFjpqYiLgDAN5IOXY5cUTd9B85ka0aCFSHNlY4ParE5N5w== X-Received: by 2002:a17:902:728b:b0:188:6baf:1fe7 with SMTP id d11-20020a170902728b00b001886baf1fe7mr29852161pll.123.1668097687326; Thu, 10 Nov 2022 08:28:07 -0800 (PST) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id 1-20020a17090a0f0100b00200a85fa777sm3323273pjy.1.2022.11.10.08.28.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Nov 2022 08:28:07 -0800 (PST) From: coverity-bot X-Google-Original-From: coverity-bot Date: Thu, 10 Nov 2022 08:28:06 -0800 To: Benjamin Mugnier Cc: linux-kernel@vger.kernel.org, Sakari Ailus , Jean-Michel Hautbois , Shawn Tu , linux-media@vger.kernel.org, Sylvain Petinot , Laurent Pinchart , Hans Verkuil , Mauro Carvalho Chehab , "Gustavo A. R. Silva" , linux-next@vger.kernel.org, linux-hardening@vger.kernel.org Subject: Coverity: vgxy61_detect(): Control flow issues Message-ID: <202211100828.FEDCDE7@keescook> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello! This is an experimental semi-automated report about issues detected by Coverity from a scan of next-20221110 as part of the linux-next scan project: https://scan.coverity.com/projects/linux-next-weekly-scan You're getting this email because you were associated with the identified lines of code (noted below) that were touched by commits: Thu Oct 27 14:37:38 2022 +0300 153e4ad44d60 ("media: i2c: Add driver for ST VGXY61 camera sensor") Coverity reported the following: *** CID 1527257: Control flow issues (NO_EFFECT) drivers/media/i2c/st-vgxy61.c:1679 in vgxy61_detect() 1673 struct i2c_client *client = sensor->i2c_client; 1674 u16 id = 0; 1675 int ret; 1676 u8 st; 1677 1678 id = vgxy61_read_reg(sensor, VGXY61_REG_MODEL_ID); vvv CID 1527257: Control flow issues (NO_EFFECT) vvv This less-than-zero comparison of an unsigned value is never true. "id < 0". 1679 if (id < 0) 1680 return id; 1681 if (id != VG5661_MODEL_ID && id != VG5761_MODEL_ID) { 1682 dev_warn(&client->dev, "Unsupported sensor id %x\n", id); 1683 return -ENODEV; 1684 } If this is a false positive, please let us know so we can mark it as such, or teach the Coverity rules to be smarter. If not, please make sure fixes get into linux-next. :) For patches fixing this, please include these lines (but double-check the "Fixes" first): Reported-by: coverity-bot Addresses-Coverity-ID: 1527257 ("Control flow issues") Fixes: 153e4ad44d60 ("media: i2c: Add driver for ST VGXY61 camera sensor") Thanks for your attention! -- Coverity-bot