Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 171150
b: refs/heads/master
c: 0d37f36
h: refs/heads/master
v: v3
  • Loading branch information
roel kluin authored and David S. Miller committed Nov 4, 2009
1 parent a4d8ff2 commit e995e88
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 885ee398de2354cf4526a3ecaf9e84e292393007
refs/heads/master: 0d37f36ff9bc41067c71635d14b6a5834853a779
8 changes: 4 additions & 4 deletions trunk/drivers/net/cnic.c
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ int cnic_register_driver(int ulp_type, struct cnic_ulp_ops *ulp_ops)
{
struct cnic_dev *dev;

if (ulp_type >= MAX_CNIC_ULP_TYPE) {
if (ulp_type < 0 || ulp_type >= MAX_CNIC_ULP_TYPE) {
printk(KERN_ERR PFX "cnic_register_driver: Bad type %d\n",
ulp_type);
return -EINVAL;
Expand Down Expand Up @@ -454,7 +454,7 @@ int cnic_unregister_driver(int ulp_type)
struct cnic_ulp_ops *ulp_ops;
int i = 0;

if (ulp_type >= MAX_CNIC_ULP_TYPE) {
if (ulp_type < 0 || ulp_type >= MAX_CNIC_ULP_TYPE) {
printk(KERN_ERR PFX "cnic_unregister_driver: Bad type %d\n",
ulp_type);
return -EINVAL;
Expand Down Expand Up @@ -510,7 +510,7 @@ static int cnic_register_device(struct cnic_dev *dev, int ulp_type,
struct cnic_local *cp = dev->cnic_priv;
struct cnic_ulp_ops *ulp_ops;

if (ulp_type >= MAX_CNIC_ULP_TYPE) {
if (ulp_type < 0 || ulp_type >= MAX_CNIC_ULP_TYPE) {
printk(KERN_ERR PFX "cnic_register_device: Bad type %d\n",
ulp_type);
return -EINVAL;
Expand Down Expand Up @@ -551,7 +551,7 @@ static int cnic_unregister_device(struct cnic_dev *dev, int ulp_type)
struct cnic_local *cp = dev->cnic_priv;
int i = 0;

if (ulp_type >= MAX_CNIC_ULP_TYPE) {
if (ulp_type < 0 || ulp_type >= MAX_CNIC_ULP_TYPE) {
printk(KERN_ERR PFX "cnic_unregister_device: Bad type %d\n",
ulp_type);
return -EINVAL;
Expand Down

0 comments on commit e995e88

Please sign in to comment.