From patchwork Sat Jan 16 20:11:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 12025023 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-20.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2CE47C433DB for ; Sat, 16 Jan 2021 20:11:19 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7F18122CAE for ; Sat, 16 Jan 2021 20:11:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7F18122CAE Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=inria.fr Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 804768D020D; Sat, 16 Jan 2021 15:11:17 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 78EA38D01D5; Sat, 16 Jan 2021 15:11:17 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 62E1A8D020D; Sat, 16 Jan 2021 15:11:17 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0220.hostedemail.com [216.40.44.220]) by kanga.kvack.org (Postfix) with ESMTP id 49FCF8D01D5 for ; Sat, 16 Jan 2021 15:11:17 -0500 (EST) Received: from smtpin07.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 0B4A2362D for ; Sat, 16 Jan 2021 20:11:17 +0000 (UTC) X-FDA: 77712732594.07.wash14_010fca62753a Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin07.hostedemail.com (Postfix) with ESMTP id D8BCA1803F90D for ; Sat, 16 Jan 2021 20:11:16 +0000 (UTC) X-HE-Tag: wash14_010fca62753a X-Filterd-Recvd-Size: 2409 Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by imf12.hostedemail.com (Postfix) with ESMTP for ; Sat, 16 Jan 2021 20:11:15 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.79,352,1602540000"; d="scan'208";a="370224224" Received: from 173.121.68.85.rev.sfr.net (HELO hadrien) ([85.68.121.173]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Jan 2021 21:11:13 +0100 Date: Sat, 16 Jan 2021 21:11:13 +0100 (CET) From: Julia Lawall X-X-Sender: jll@hadrien To: Paul Kocialkowski cc: Mauro Carvalho Chehab , linux-media@vger.kernel.org, =?iso-8859-15?q?K=E9vin_L=27h=F4pital?= , Sakari Ailus , linux-kernel@vger.kernel.org, Linux Memory Management List , kbuild-all@lists.01.org Subject: [PATCH] media: i2c: fix odd_ptr_err.cocci warnings Message-ID: User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: kernel test robot PTR_ERR should access the value just tested by IS_ERR Generated by: scripts/coccinelle/tests/odd_ptr_err.cocci Fixes: 11c0d8fdccc5 ("media: i2c: Add support for the OV8865 image sensor") CC: Paul Kocialkowski Reported-by: kernel test robot Signed-off-by: kernel test robot Signed-off-by: Julia Lawall Reviewed-by: Paul Kocialkowski --- tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: b3a3cbdec55b090d22a09f75efb7c7d34cb97f25 commit: 11c0d8fdccc56fa15cb15906480b4737c31dd085 [2650/3956] media: i2c: Add support for the OV8865 image sensor :::::: branch date: 2 days ago :::::: commit date: 4 days ago ov8865.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/media/i2c/ov8865.c +++ b/drivers/media/i2c/ov8865.c @@ -2849,7 +2849,7 @@ static int ov8865_probe(struct i2c_clien sensor->avdd = devm_regulator_get(dev, "avdd"); if (IS_ERR(sensor->avdd)) { dev_err(dev, "cannot get AVDD (analog) regulator\n"); - ret = PTR_ERR(sensor->dvdd); + ret = PTR_ERR(sensor->avdd); goto error_endpoint; }