tree: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.5 head: 1a476abc723e644248dba975b71122fcf878703b commit: 9e28f6532c611c0c3fa759d2101aba9f0d41e860 [2/32] ASoC: fsl_mqs: Add MQS component driver reproduce: # apt-get install sparse # sparse version: v0.6.1-rc1-37-gd466a02-dirty git checkout 9e28f6532c611c0c3fa759d2101aba9f0d41e860 make ARCH=x86_64 allmodconfig make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
If you fix the issue, kindly add following tag Reported-by: kbuild test robot lkp@intel.com
sparse warnings: (new ones prefixed by >>)
sound/soc/fsl/fsl_mqs.c:182:38: sparse: sparse: Using plain integer as NULL pointer
vim +182 sound/soc/fsl/fsl_mqs.c
178 179 static int fsl_mqs_probe(struct platform_device *pdev) 180 { 181 struct device_node *np = pdev->dev.of_node;
182 struct device_node *gpr_np = 0;
183 struct fsl_mqs *mqs_priv; 184 void __iomem *regs; 185 int ret = 0; 186 187 mqs_priv = devm_kzalloc(&pdev->dev, sizeof(*mqs_priv), GFP_KERNEL); 188 if (!mqs_priv) 189 return -ENOMEM; 190 191 /* On i.MX6sx the MQS control register is in GPR domain 192 * But in i.MX8QM/i.MX8QXP the control register is moved 193 * to its own domain. 194 */ 195 if (of_device_is_compatible(np, "fsl,imx8qm-mqs")) 196 mqs_priv->use_gpr = false; 197 else 198 mqs_priv->use_gpr = true; 199 200 if (mqs_priv->use_gpr) { 201 gpr_np = of_parse_phandle(np, "gpr", 0); 202 if (IS_ERR(gpr_np)) { 203 dev_err(&pdev->dev, "failed to get gpr node by phandle\n"); 204 ret = PTR_ERR(gpr_np); 205 goto out; 206 } 207 208 mqs_priv->regmap = syscon_node_to_regmap(gpr_np); 209 if (IS_ERR(mqs_priv->regmap)) { 210 dev_err(&pdev->dev, "failed to get gpr regmap\n"); 211 ret = PTR_ERR(mqs_priv->regmap); 212 goto out; 213 } 214 } else { 215 regs = devm_platform_ioremap_resource(pdev, 0); 216 if (IS_ERR(regs)) 217 return PTR_ERR(regs); 218 219 mqs_priv->regmap = devm_regmap_init_mmio_clk(&pdev->dev, 220 "core", 221 regs, 222 &fsl_mqs_regmap_config); 223 if (IS_ERR(mqs_priv->regmap)) { 224 dev_err(&pdev->dev, "failed to init regmap: %ld\n", 225 PTR_ERR(mqs_priv->regmap)); 226 return PTR_ERR(mqs_priv->regmap); 227 } 228 229 mqs_priv->ipg = devm_clk_get(&pdev->dev, "core"); 230 if (IS_ERR(mqs_priv->ipg)) { 231 dev_err(&pdev->dev, "failed to get the clock: %ld\n", 232 PTR_ERR(mqs_priv->ipg)); 233 goto out; 234 } 235 } 236 237 mqs_priv->mclk = devm_clk_get(&pdev->dev, "mclk"); 238 if (IS_ERR(mqs_priv->mclk)) { 239 dev_err(&pdev->dev, "failed to get the clock: %ld\n", 240 PTR_ERR(mqs_priv->mclk)); 241 goto out; 242 } 243 244 dev_set_drvdata(&pdev->dev, mqs_priv); 245 pm_runtime_enable(&pdev->dev); 246 247 return devm_snd_soc_register_component(&pdev->dev, &soc_codec_fsl_mqs, 248 &fsl_mqs_dai, 1); 249 out: 250 if (!IS_ERR(gpr_np)) 251 of_node_put(gpr_np); 252 253 return ret; 254 } 255
--- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation