Results 1 to 2 of 2
Hi, guys
I write a driver for camera ov9655 based-s3c2440. When I test the driver, the system show me division by zero in kernel and the test routine is blocked! ...
- 12-01-2010 #1Just Joined!
- Join Date
- May 2010
- Posts
- 2
Division by zero in kernel!
Hi, guys
I write a driver for camera ov9655 based-s3c2440. When I test the driver, the system show me division by zero in kernel and the test routine is blocked! what can I do someting with this bug.
The following image is the information that the systme show me:
Division by zero in kernel.
Backtrace:
[<c00331cc>] (dump_backtrace+0x0/0x10c) from [<c0326c68>] (dump_stack+0x18/0x1c)
r7:00000000 r6:00000000 r5:c5200000 r4:80000000
[<c0326c50>] (dump_stack+0x0/0x1c) from [<c0033924>] (__div0+0x18/0x20)
[<c003390c>] (__div0+0x0/0x20) from [<c0142f58>] (Ldiv0+0x8/0x10)
[<bf000c54>] (camif_open+0x0/0x694 [camera_driver]) from [<c016ad64>] (misc_open+0x158/0x20
[<c016ac0c>] (misc_open+0x0/0x20
from [<c009ccf4>] (chrdev_open+0xd0/0x160)
r9:00000001 r8:c009cc24 r7:00000000 r6:c383de80 r5:c3afc800
r4:c34e3110
- 12-01-2010 #2Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,961
All this debug info is useless! Please post kernel drive code here. If you are dividing by a variable value, test the variable for 0 before you try to do the divide. Also, you cannot do floating point math in the kernel - integer math only. So, if you are doing a divide in a kernel module, try a left shift operation instead!
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!


Reply With Quote
