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 6708CC4708E for ; Sun, 4 Dec 2022 09:23:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229861AbiLDJXg (ORCPT ); Sun, 4 Dec 2022 04:23:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229539AbiLDJXe (ORCPT ); Sun, 4 Dec 2022 04:23:34 -0500 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D6D6E16580; Sun, 4 Dec 2022 01:23:33 -0800 (PST) Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2B49K2gr001785; Sun, 4 Dec 2022 09:23:25 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=qcppdkim1; bh=eBEBDdM1WqCMw8hTwITff/zx3OBFIeNzjgTDJTDfPlY=; b=kJMSsDxZGXWjbTdv5/ZL/gzY6VmrnvdzQgwW0+aIlpca0hyxfjaLyypRruKDdQSo2HRt WT+C2t0/LHbJH3Z1fu/pB0ZOtNEutFq3IZj2NoOm96AXhXl6yd5oCdx21FIqRb+pFEYq 5SFbk1qZm4Z6PJOwPW4+lmGx5PCXDezdge2nA8dAKaPYfUZyGsjGIWWzdCCCSUK6YlcP EWBK28rJAJCQifbv6wQ4eTrHt1kQ9c6K+uGuVEPsEJQsN5luGos95WeGute4kqE8Thq8 3aJPkv9W9VahjYCeNKevIIPj63lGct2r5613qxP3CRkbJL2eLB9W2WnRbXKKXj2V15dq 5w== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3m7yrf1qse-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 04 Dec 2022 09:23:25 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 2B49NOAR019690 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 4 Dec 2022 09:23:24 GMT Received: from jprakash-linux.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Sun, 4 Dec 2022 01:23:20 -0800 From: Jishnu Prakash To: , , , , , , , , , CC: , , , Jishnu Prakash Subject: [PATCH] Update spmi driver removal API Date: Sun, 4 Dec 2022 14:52:59 +0530 Message-ID: <1670145780-13111-1-git-send-email-quic_jprakash@quicinc.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: D8KvXx7n_6f8BJWYplUB_ME1UuEOFG7p X-Proofpoint-ORIG-GUID: D8KvXx7n_6f8BJWYplUB_ME1UuEOFG7p X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.923,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-12-04_06,2022-12-01_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 mlxlogscore=383 phishscore=0 malwarescore=0 impostorscore=0 suspectscore=0 adultscore=0 clxscore=1011 mlxscore=0 spamscore=0 priorityscore=1501 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2212040087 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add a check for remove callback presence before calling it, to avoid NULL pointer dereference error when attempting to remove a SPMI driver module which does not have the remove callback defined. Jishnu Prakash (1): spmi: Add check for remove callback in spmi_drv_remove API drivers/spmi/spmi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.7.4