For the cases which the interrupt for this device is not specified, it must be
checked whether it is or not. Without it, an error occurs, because some
operations are done on the interrupt number which is not specified well.
Change-Id: Idc0a4b0f1e99f0f1022795927c54c1d3f56a4459
Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com>
struct i2c_client *i2c = container_of(dev, struct i2c_client, dev);
struct max77686_dev *max77686 = i2c_get_clientdata(i2c);
+ if (!max77686->irq)
+ return 0;
+
if (device_may_wakeup(dev))
enable_irq_wake(max77686->irq);
struct i2c_client *i2c = container_of(dev, struct i2c_client, dev);
struct max77686_dev *max77686 = i2c_get_clientdata(i2c);
+ if (!max77686->irq)
+ return 0;
+
if (device_may_wakeup(dev))
disable_irq_wake(max77686->irq);