Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 219336
b: refs/heads/master
c: b4d752b
h: refs/heads/master
v: v3
  • Loading branch information
Mauro Carvalho Chehab committed Oct 21, 2010
1 parent f0bbe87 commit e5e05af
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b784cfcec7293f688b09d3850826216a4e134d2e
refs/heads/master: b4d752b308493b08b51ea04361848ef63d0cad42
9 changes: 9 additions & 0 deletions trunk/drivers/media/IR/ir-sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ static ssize_t show_protocols(struct device *d,
char *tmp = buf;
int i;

/* Device is being removed */
if (!ir_dev)
return -EINVAL;

if (ir_dev->props && ir_dev->props->driver_type == RC_DRIVER_SCANCODE) {
enabled = ir_dev->rc_tab.ir_type;
allowed = ir_dev->props->allowed_protos;
Expand Down Expand Up @@ -123,6 +127,10 @@ static ssize_t store_protocols(struct device *d,
int rc, i, count = 0;
unsigned long flags;

/* Device is being removed */
if (!ir_dev)
return -EINVAL;

if (ir_dev->props && ir_dev->props->driver_type == RC_DRIVER_SCANCODE)
type = ir_dev->rc_tab.ir_type;
else if (ir_dev->raw)
Expand Down Expand Up @@ -310,6 +318,7 @@ void ir_unregister_class(struct input_dev *input_dev)
{
struct ir_input_dev *ir_dev = input_get_drvdata(input_dev);

input_set_drvdata(input_dev, NULL);
clear_bit(ir_dev->devno, &ir_core_dev_number);
input_unregister_device(input_dev);
device_del(&ir_dev->dev);
Expand Down

0 comments on commit e5e05af

Please sign in to comment.