Avoid to break the support of N80, it's needed to have this check.

Signed-off-by: Matt Hsu <[email protected]>
---
 drivers/leds/leds-lp5521.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/leds/leds-lp5521.c b/drivers/leds/leds-lp5521.c
index 8b0e5f6..62d68fd 100644
--- a/drivers/leds/leds-lp5521.c
+++ b/drivers/leds/leds-lp5521.c
@@ -544,7 +544,8 @@ static int lp5521_probe(struct i2c_client *client, const 
struct i2c_device_id *i
        mutex_init(&chip->lock);
 
        /* enter start-up mode */
-       (pdata->ext_enable)(1);
+       if (pdata->ext_enable)
+               (pdata->ext_enable)(1);
 
        ret = lp5521_configure(client);
        if (ret < 0) {
-- 
1.5.6.5


Reply via email to