aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/mISDNif.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/mISDNif.h b/include/linux/mISDNif.h
index 557477ac3d5b..5da3d95b27f1 100644
--- a/include/linux/mISDNif.h
+++ b/include/linux/mISDNif.h
@@ -559,7 +559,10 @@ extern void mISDN_unregister_clock(struct mISDNclock *);
559 559
560static inline struct mISDNdevice *dev_to_mISDN(struct device *dev) 560static inline struct mISDNdevice *dev_to_mISDN(struct device *dev)
561{ 561{
562 return dev_get_drvdata(dev); 562 if (dev)
563 return dev_get_drvdata(dev);
564 else
565 return NULL;
563} 566}
564 567
565extern void set_channel_address(struct mISDNchannel *, u_int, u_int); 568extern void set_channel_address(struct mISDNchannel *, u_int, u_int);