diff options
Diffstat (limited to 'drivers/media/media-devnode.c')
-rw-r--r-- | drivers/media/media-devnode.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/media-devnode.c b/drivers/media/media-devnode.c index af5263c6625a..7b42ace419d9 100644 --- a/drivers/media/media-devnode.c +++ b/drivers/media/media-devnode.c | |||
@@ -213,14 +213,14 @@ int __must_check media_devnode_register(struct media_devnode *mdev) | |||
213 | 213 | ||
214 | /* Part 1: Find a free minor number */ | 214 | /* Part 1: Find a free minor number */ |
215 | mutex_lock(&media_devnode_lock); | 215 | mutex_lock(&media_devnode_lock); |
216 | minor = find_next_zero_bit(media_devnode_nums, 0, MEDIA_NUM_DEVICES); | 216 | minor = find_next_zero_bit(media_devnode_nums, MEDIA_NUM_DEVICES, 0); |
217 | if (minor == MEDIA_NUM_DEVICES) { | 217 | if (minor == MEDIA_NUM_DEVICES) { |
218 | mutex_unlock(&media_devnode_lock); | 218 | mutex_unlock(&media_devnode_lock); |
219 | printk(KERN_ERR "could not get a free minor\n"); | 219 | printk(KERN_ERR "could not get a free minor\n"); |
220 | return -ENFILE; | 220 | return -ENFILE; |
221 | } | 221 | } |
222 | 222 | ||
223 | set_bit(mdev->minor, media_devnode_nums); | 223 | set_bit(minor, media_devnode_nums); |
224 | mutex_unlock(&media_devnode_lock); | 224 | mutex_unlock(&media_devnode_lock); |
225 | 225 | ||
226 | mdev->minor = minor; | 226 | mdev->minor = minor; |