hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/drivers/nfc/fdp/i2c.c
....@@ -249,6 +249,9 @@
249249 len, sizeof(**fw_vsc_cfg),
250250 GFP_KERNEL);
251251
252
+ if (!*fw_vsc_cfg)
253
+ goto alloc_err;
254
+
252255 r = device_property_read_u8_array(dev, FDP_DP_FW_VSC_CFG_NAME,
253256 *fw_vsc_cfg, len);
254257
....@@ -262,6 +265,7 @@
262265 *fw_vsc_cfg = NULL;
263266 }
264267
268
+alloc_err:
265269 dev_dbg(dev, "Clock type: %d, clock frequency: %d, VSC: %s",
266270 *clock_type, *clock_freq, *fw_vsc_cfg != NULL ? "yes" : "no");
267271 }