It's not possible to do the dereferences on line 381 on a null rk808 value.
julia ---------- Forwarded message ---------- Date: Sat, 17 Mar 2018 14:05:31 +0800 From: kbuild test robot <[email protected]> To: [email protected] Cc: Julia Lawall <[email protected]> Subject: Re: [PATCH v3] mfd: rk808: Add restart functionality CC: [email protected] In-Reply-To: <[email protected]> References: <[email protected]> TO: Daniel Schultz <[email protected]> CC: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected] CC: [email protected], [email protected], [email protected], [email protected], [email protected] Hi Daniel, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on v4.16-rc4] [also build test WARNING on next-20180316] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Daniel-Schultz/mfd-rk808-Add-restart-functionality/20180317-110140 :::::: branch date: 3 hours ago :::::: commit date: 3 hours ago >> drivers/mfd/rk808.c:381:11-26: ERROR: rk808 is NULL but dereferenced. # https://github.com/0day-ci/linux/commit/91c5d1a0547a025c6b1f1204aee5b1681e0145fe git remote add linux-review https://github.com/0day-ci/linux git remote update linux-review git checkout 91c5d1a0547a025c6b1f1204aee5b1681e0145fe vim +381 drivers/mfd/rk808.c 990f05f6 Elaine Zhang 2017-08-21 372 91c5d1a0 Daniel Schultz 2018-03-16 373 static void rk808_update_bits(unsigned int reg, unsigned int bit_mask) 990f05f6 Elaine Zhang 2017-08-21 374 { 990f05f6 Elaine Zhang 2017-08-21 375 int ret; 990f05f6 Elaine Zhang 2017-08-21 376 struct rk808 *rk808 = i2c_get_clientdata(rk808_i2c_client); 990f05f6 Elaine Zhang 2017-08-21 377 990f05f6 Elaine Zhang 2017-08-21 378 if (!rk808) { 990f05f6 Elaine Zhang 2017-08-21 379 dev_warn(&rk808_i2c_client->dev, 91c5d1a0 Daniel Schultz 2018-03-16 380 "have no %s, so do nothing here\n", 91c5d1a0 Daniel Schultz 2018-03-16 @381 rk808->regmap_irq_chip->name); 990f05f6 Elaine Zhang 2017-08-21 382 return; 990f05f6 Elaine Zhang 2017-08-21 383 } 990f05f6 Elaine Zhang 2017-08-21 384 990f05f6 Elaine Zhang 2017-08-21 385 ret = regmap_update_bits(rk808->regmap, 91c5d1a0 Daniel Schultz 2018-03-16 386 reg, 91c5d1a0 Daniel Schultz 2018-03-16 387 bit_mask, bit_mask); 990f05f6 Elaine Zhang 2017-08-21 388 if (ret) 91c5d1a0 Daniel Schultz 2018-03-16 389 dev_err(&rk808_i2c_client->dev, "can't write to DEVCTRL: %x!\n", 91c5d1a0 Daniel Schultz 2018-03-16 390 ret); 990f05f6 Elaine Zhang 2017-08-21 391 } 990f05f6 Elaine Zhang 2017-08-21 392 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation

