Commit e5ac0190 authored by Russell King's avatar Russell King

[ARM] Fix some sparse complaints:

Pointers are NULL not 0.
Remove obviously unnecessary iBCS2 shm stuff... we're ARM after all.
parent 89041f1b
......@@ -121,9 +121,9 @@ alloc_safe_buffer(struct dmabounce_device_info *device_info, void *ptr,
DO_STATS ( device_info->total_allocs++ );
buf = kmalloc(sizeof(struct safe_buffer), GFP_ATOMIC);
if (buf == 0) {
if (buf == NULL) {
dev_warn(dev, "%s: kmalloc failed\n", __func__);
return 0;
return NULL;
}
if (size <= device_info->small_buffer_size) {
......@@ -137,16 +137,16 @@ alloc_safe_buffer(struct dmabounce_device_info *device_info, void *ptr,
DO_STATS ( device_info->lbp_allocs++ );
} else {
pool = 0;
pool = NULL;
safe = dma_alloc_coherent(dev, size, &safe_dma_addr, GFP_ATOMIC);
}
if (safe == 0) {
if (safe == NULL) {
dev_warn(device_info->dev,
"%s: could not alloc dma memory (size=%d)\n",
__func__, size);
kfree(buf);
return 0;
return NULL;
}
#ifdef STATS
......
......@@ -217,11 +217,8 @@ asmlinkage int sys_ipc(uint call, int first, int second, int third,
return ret;
return put_user(raddr, (ulong __user *)third);
}
case 1: /* iBCS2 emulator entry point */
if (!segment_eq(get_fs(), get_ds()))
case 1: /* Of course, we don't support iBCS2! */
return -EINVAL;
return do_shmat(first, (char __user *) ptr,
second, (ulong __user *) third);
}
case SHMDT:
return sys_shmdt ((char __user *)ptr);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment