From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============4535095344688576894==" MIME-Version: 1.0 From: kbuild test robot To: kbuild-all@lists.01.org Subject: [staging:staging-testing 41/59] drivers/staging/wfx/main.c:47:14-21: ERROR: PTR_ERR applied after initialization to constant on line 42 Date: Fri, 04 Oct 2019 18:48:12 +0800 Message-ID: <201910041809.W4MyUT1q%lkp@intel.com> List-Id: --===============4535095344688576894== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git = staging-testing head: 40115bbc40e2fd2de0e01ef2a28e0d09a1b5d0d1 commit: 0096214a59a72b3c3c943e27bd03307324d3ce0f [41/59] staging: wfx: add = support for I/O access If you fix the issue, kindly add following tag Reported-by: kbuild test robot coccinelle warnings: (new ones prefixed by >>) >> drivers/staging/wfx/main.c:47:14-21: ERROR: PTR_ERR applied after initia= lization to constant on line 42 vim +47 drivers/staging/wfx/main.c 30 = 31 struct gpio_desc *wfx_get_gpio(struct device *dev, int override, con= st char *label) 32 { 33 struct gpio_desc *ret; 34 char label_buf[256]; 35 = 36 if (override >=3D 0) { 37 snprintf(label_buf, sizeof(label_buf), "wfx_%s", label); 38 ret =3D ERR_PTR(devm_gpio_request_one(dev, override, GPIOF_OUT_INI= T_LOW, label_buf)); 39 if (!ret) 40 ret =3D gpio_to_desc(override); 41 } else if (override =3D=3D -1) { > 42 ret =3D NULL; 43 } else { 44 ret =3D devm_gpiod_get(dev, label, GPIOD_OUT_LOW); 45 } 46 if (IS_ERR(ret) || !ret) { > 47 if (!ret || PTR_ERR(ret) =3D=3D -ENOENT) 48 dev_warn(dev, "gpio %s is not defined\n", label); 49 else 50 dev_warn(dev, "error while requesting gpio %s\n", label); 51 ret =3D NULL; 52 } else { 53 dev_dbg(dev, "using gpio %d for %s\n", desc_to_gpio(ret), label); 54 } 55 return ret; 56 } 57 = --- 0-DAY kernel test infrastructure Open Source Technology Cent= er https://lists.01.org/pipermail/kbuild-all Intel Corporati= on --===============4535095344688576894==--