kernel/drivers/nfc/fdp/i2c.c
.. .. @@ -249,6 +249,9 @@ 249 249 len, sizeof(**fw_vsc_cfg), 250 250 GFP_KERNEL); 251 251 252 + if (!*fw_vsc_cfg)253 + goto alloc_err;254 +252 255 r = device_property_read_u8_array(dev, FDP_DP_FW_VSC_CFG_NAME, 253 256 *fw_vsc_cfg, len); 254 257 .. .. @@ -262,6 +265,7 @@ 262 265 *fw_vsc_cfg = NULL; 263 266 } 264 267 268 +alloc_err:265 269 dev_dbg(dev, "Clock type: %d, clock frequency: %d, VSC: %s", 266 270 *clock_type, *clock_freq, *fw_vsc_cfg != NULL ? "yes" : "no"); 267 271 }