Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp2714063rdb; Mon, 5 Feb 2024 15:44:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IEH3Rp/90SCIXdghPbI3Zde/S+TlYVpKQ7mg0JpCdsYH7CRRrfQ/fQuTMFDM5t0CRJdXRel X-Received: by 2002:a05:6358:d399:b0:176:cf18:d0bb with SMTP id mp25-20020a056358d39900b00176cf18d0bbmr460814rwb.13.1707176666286; Mon, 05 Feb 2024 15:44:26 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707176666; cv=pass; d=google.com; s=arc-20160816; b=vA8EVZXGq8XEPLhuzEsH0gYGxRCLEyAbRqwjirlkFVPGdcJvA8bMN0vNYUT7TS35oR nL3mPN+2k0mtGwTkzr78Xu6epIgDctuJraZ+sYxL/Haphr1TrRbJJrHyZ+eQvvE4lLTB GE7cyU6kp8pkW8QJHPoKbXPWQFYs8pNfbhEhqRzL1j0dFBSdHvDhQMpdTSfdQMnszagf gfR0ZDj8Dkeosi+dLM1l9mEG0GAJis7JiKDx07VmMY+0RavKLqceOm/fkL3ua/oCTIyT Ksw8qCIX7HzoMSMCuXpVKSZapnLipHSR6cGXyMTLh277irCMTQXqiv6fnNw+4CU56kAi jekg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=ZUwfEox2Gmy2Mb7bQh8JJ1dI1oJWyCYJiPWEmtTM5E8=; fh=VXMaZkOTtgtqV2iSkN48A4E/cBbISFPVaCXbg7Yj4k0=; b=gxAYb5HMYsNvI2ZyQ79BiNELweTXSi8o6d/sPM6JLJUg5RKhCCY6GZ04/+v36NtsHZ Jp7q5Ju0XkjxgiK9b7usDsggilKFBj06VJEHzb2d/Rypt0ZovZRGVHGfX61PzM217wHV pdXUGACeuG9f5/sUS9vtgcSh7D5ibzVaGXWGsvZi0IgiViMg+qbddpXOcIfc7tiGY73k WBKnDWi4VaJLTbXZFzAHdrDe0ZYVBuOgCqbHp9UDYUJXfh+MgE3yU04DM9Rs/CGo2hpU ylZ4eR9i60UJGmRkqgpI5d+B05Y5b27Q2hmkRMz1P471Orcr+r7K4esEI6T+214bIbmU 7K9g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="NR1zohk/"; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-54102-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-54102-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com X-Forwarded-Encrypted: i=1; AJvYcCUooC4TEl/+JdYUycZYN93itpQ0fdswj5JKYFE3x801Elj2mewxCxUWYGZ/kr8MuUcn/rUZAZyzwhEKRp9wDmUSIZAjxRCA8pG/ShN3ZQ== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id u10-20020a63d34a000000b005dc1bb540cesi600142pgi.76.2024.02.05.15.44.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 15:44:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-54102-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="NR1zohk/"; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-54102-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-54102-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id F4145B2380F for ; Mon, 5 Feb 2024 23:43:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A430B4B5DD; Mon, 5 Feb 2024 23:43:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="NR1zohk/" Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3566E4D9F0; Mon, 5 Feb 2024 23:43:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707176594; cv=none; b=O2sI6RugLLjqLeKbaQyyhgx4/RMMRovdaOFplEU/L3IPsRLU6KXRu1sNUam9YrSKmIlbmbILeWxgjnWgPZy1X0a9VfnpZTUcojyjkE3PGxSmzGbJWvXd7eswoozRJkujELMFcOkKjuuaOoRpimdanYe+kZEsXlYX9KTkqFubReM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707176594; c=relaxed/simple; bh=/j8Me4jOfxM2HK+iG5EIgQmxB68U6ITj91R98wi3LDo=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=AbZL5Q7c7VOArNAiUVw0L14Xmrex9YmE0E/HnBYaGEZhUNIPmuTcTqNzQiiz67bMtUQlSqU3i5hUapXUk08kwdWOPJnDBuQLitLa/qLZWFWzFdfCpE+wxWARUHUTh24mWVdv83ewO1kU/oCMt3ciqZeeKCokjbYT0NUwmUv9/Tw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=NR1zohk/; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 415NXFtc028179; Mon, 5 Feb 2024 23:43:01 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= message-id:date:mime-version:subject:to:cc:references:from :in-reply-to:content-type:content-transfer-encoding; s= qcppdkim1; bh=ZUwfEox2Gmy2Mb7bQh8JJ1dI1oJWyCYJiPWEmtTM5E8=; b=NR 1zohk/HjsiUjRhW2p/9oyOqXieLdAbi1mapluipweZyCW12L1Qc3Y0QC4n4T/lJo 4kf3eapA9XW4SHpQi7AnuzxlyZ9o4Jh3kY9XCPPktIrMSMU/YLHqVvmfs6YVPJdm ICl09gOyC/EQeuw03zjMoKl9y1Oc5SU6A3N+5SA9tlg2sUU6edQMvoVF+0jaH8S8 cGHOnfxxtrlKqixFnXAHReuZuhsLcNYF04OeTArKwl87Gp5k2H0pshu5bIIUHZfy QyffJllmKWKgFwrWyB2Ty5YgtvUHsd4QXciK+TkqdIuGOMpZyfHCxIXc7seRT8GE 2+QMI/iSHviadfUPU01g== Received: from nasanppmta04.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3w2udda2p5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 05 Feb 2024 23:43:01 +0000 (GMT) Received: from nasanex01b.na.qualcomm.com (nasanex01b.na.qualcomm.com [10.46.141.250]) by NASANPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 415Nh0ch013530 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 5 Feb 2024 23:43:00 GMT Received: from [10.47.206.1] (10.49.16.6) by nasanex01b.na.qualcomm.com (10.46.141.250) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Mon, 5 Feb 2024 15:43:00 -0800 Message-ID: <3c344e06-ac15-abe2-4fd6-5735090a1f58@quicinc.com> Date: Mon, 5 Feb 2024 15:42:59 -0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH] spmi: pmic-arb: Replace three IS_ERR() calls by null pointer checks in spmi_pmic_arb_probe() Content-Language: en-US To: Markus Elfring , , AngeloGioacchino Del Regno , Bjorn Andersson , Fei Shao , Greg Kroah-Hartman , Peng Wu , Stephen Boyd , Vinod Koul CC: LKML , Dmitry Baryshkov References: <82a0768e-95b0-4091-bdd1-14c3e893726b@web.de> From: David Collins In-Reply-To: <82a0768e-95b0-4091-bdd1-14c3e893726b@web.de> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: nalasex01c.na.qualcomm.com (10.47.97.35) To nasanex01b.na.qualcomm.com (10.46.141.250) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: 3MuUxwA4YiYlrpUe-0svT0s0Ry0JovhR X-Proofpoint-GUID: 3MuUxwA4YiYlrpUe-0svT0s0Ry0JovhR X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-02-05_17,2024-01-31_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 phishscore=0 impostorscore=0 lowpriorityscore=0 mlxlogscore=740 clxscore=1011 priorityscore=1501 mlxscore=0 malwarescore=0 adultscore=0 bulkscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2401310000 definitions=main-2402050177 On 2/4/24 01:24, Markus Elfring wrote: > From: Markus Elfring > Date: Sun, 4 Feb 2024 09:39:48 +0100 > > The devm_ioremap() function does not return error pointers. > It returns NULL on error. > This issue was detected once more also by using the Coccinelle software. > > Update three checks (and corresponding error codes) for failed > function calls accordingly. > > Fixes: ffdfbafdc4f4 ("spmi: Use devm_spmi_controller_alloc()") > Fixes: 231601cd22bd ("spmi: pmic-arb: Add support for PMIC v7") > Signed-off-by: Markus Elfring > --- > > See also: > Suggestion by Peng Wu > [PATCH -next] spmi: pmic-arb: fix a NULL vs IS_ERR() check in spmi_pmic_arb_probe() > https://lore.kernel.org/lkml/20221115090927.47143-1-wupeng58@huawei.com/ > https://lkml.org/lkml/2022/11/15/197 > > > drivers/spmi/spmi-pmic-arb.c | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) Reviewed-by: David Collins Thanks for making this fix. Take care, David