Skip to content

Commit

Permalink
Merge branch 'for_2.6.29' of git://git.kernel.org/pub/scm/linux/kerne…
Browse files Browse the repository at this point in the history
…l/git/kkeil/ISDN-2.6

* 'for_2.6.29' of git://git.kernel.org/pub/scm/linux/kernel/git/kkeil/ISDN-2.6:
  Fix small typo
  misdn: indentation and braces disagree - add braces
  misdn: one handmade ARRAY_SIZE converted
  drivers/isdn/hardware/mISDN: move a dereference below a NULL test
  indentation & braces disagree - add braces
  Make parameter debug writable
  BUGFIX: used NULL pointer at ioctl(sk,IMGETDEVINFO,&devinfo) when devinfo.id not registered
  • Loading branch information
torvalds committed Jan 12, 2009
2 parents 87aa08b + 24dafdf commit ddb4a9d
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
3 changes: 2 additions & 1 deletion drivers/isdn/hardware/mISDN/hfcmulti.c
Original file line number Diff line number Diff line change
Expand Up @@ -3615,14 +3615,15 @@ hfcm_bctrl(struct mISDNchannel *ch, u_int cmd, void *arg)
static void
ph_state_change(struct dchannel *dch)
{
struct hfc_multi *hc = dch->hw;
struct hfc_multi *hc;
int ch, i;

if (!dch) {
printk(KERN_WARNING "%s: ERROR given dch is NULL\n",
__func__);
return;
}
hc = dch->hw;
ch = dch->slot;

if (hc->type == 1) {
Expand Down
2 changes: 1 addition & 1 deletion drivers/isdn/hardware/mISDN/hfcpci.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ u32 hfc_jiffies;

MODULE_AUTHOR("Karsten Keil");
MODULE_LICENSE("GPL");
module_param(debug, uint, 0);
module_param(debug, uint, S_IRUGO | S_IWUSR);
module_param(poll, uint, S_IRUGO | S_IWUSR);

enum {
Expand Down
5 changes: 3 additions & 2 deletions drivers/isdn/mISDN/dsp_cmx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1579,7 +1579,7 @@ dsp_cmx_send_member(struct dsp *dsp, int len, s32 *c, int members)
schedule_work(&dsp->workq);
}

static u32 jittercount; /* counter for jitter check */;
static u32 jittercount; /* counter for jitter check */
struct timer_list dsp_spl_tl;
u32 dsp_spl_jiffies; /* calculate the next time to fire */
static u16 dsp_count; /* last sample count */
Expand Down Expand Up @@ -1893,7 +1893,7 @@ dsp_cmx_hdlc(struct dsp *dsp, struct sk_buff *skb)
/* in case of hardware (echo) */
if (dsp->pcm_slot_tx >= 0)
return;
if (dsp->echo)
if (dsp->echo) {
nskb = skb_clone(skb, GFP_ATOMIC);
if (nskb) {
hh = mISDN_HEAD_P(nskb);
Expand All @@ -1902,6 +1902,7 @@ dsp_cmx_hdlc(struct dsp *dsp, struct sk_buff *skb)
skb_queue_tail(&dsp->sendq, nskb);
schedule_work(&dsp->workq);
}
}
return;
}
/* in case of hardware conference */
Expand Down
4 changes: 2 additions & 2 deletions drivers/isdn/mISDN/dsp_pipeline.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,15 +110,15 @@ int mISDN_dsp_element_register(struct mISDN_dsp_element *elem)
}
list_add_tail(&entry->list, &dsp_elements);

for (i = 0; i < (sizeof(element_attributes)
/ sizeof(struct device_attribute)); ++i)
for (i = 0; i < ARRAY_SIZE(element_attributes); ++i) {
ret = device_create_file(&entry->dev,
&element_attributes[i]);
if (ret) {
printk(KERN_ERR "%s: failed to create device file\n",
__func__);
goto err2;
}
}

#ifdef PIPELINE_DEBUG
printk(KERN_DEBUG "%s: %s registered\n", __func__, elem->name);
Expand Down
5 changes: 4 additions & 1 deletion include/linux/mISDNif.h
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,10 @@ extern void mISDN_unregister_clock(struct mISDNclock *);

static inline struct mISDNdevice *dev_to_mISDN(struct device *dev)
{
return dev_get_drvdata(dev);
if (dev)
return dev_get_drvdata(dev);
else
return NULL;
}

extern void set_channel_address(struct mISDNchannel *, u_int, u_int);
Expand Down

0 comments on commit ddb4a9d

Please sign in to comment.