summaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/i2c-keywest.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/i2c/busses/i2c-keywest.c')
-rw-r--r--drivers/i2c/busses/i2c-keywest.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-keywest.c b/drivers/i2c/busses/i2c-keywest.c
index dd0d4c463146..363e545fc01f 100644
--- a/drivers/i2c/busses/i2c-keywest.c
+++ b/drivers/i2c/busses/i2c-keywest.c
@@ -46,7 +46,6 @@
sound driver to be happy
*/
-#include <linux/config.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/ioport.h>
@@ -516,6 +515,11 @@ create_iface(struct device_node *np, struct device *dev)
u32 *psteps, *prate;
int rc;
+ if (np->n_intrs < 1 || np->n_addrs < 1) {
+ printk(KERN_ERR "%s: Missing interrupt or address !\n",
+ np->full_name);
+ return -ENODEV;
+ }
if (pmac_low_i2c_lock(np))
return -ENODEV;
OpenPOWER on IntegriCloud