Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion drivers/isdn/hardware/mISDN/hfcsusb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1705,12 +1705,22 @@ static int
setup_hfcsusb(struct hfcsusb *hw)
{
u_char b;
int ret;
void *dmabuf = kmalloc(sizeof(u_char), GFP_KERNEL);

if (debug & DBG_HFC_CALL_TRACE)
printk(KERN_DEBUG "%s: %s\n", hw->name, __func__);

if (!dmabuf)
return -ENOMEM;

ret = read_reg_atomic(hw, HFCUSB_CHIP_ID, dmabuf);

memcpy(&b, dmabuf, sizeof(u_char));
kfree(dmabuf);

/* check the chip id */
if (read_reg_atomic(hw, HFCUSB_CHIP_ID, &b) != 1) {
if (ret != 1) {
printk(KERN_DEBUG "%s: %s: cannot read chip id\n",
hw->name, __func__);
return 1;
Expand Down