[PATCH] staging: gdm72xx: fix typo and coding style

Greg Kroah-Hartman gregkh at linuxfoundation.org
Sun Oct 5 01:18:23 UTC 2014


On Tue, Sep 30, 2014 at 01:03:03PM +0200, Thibaut Robert wrote:
> Fix a typo in error message.
> Add missing curling braces to conform to coding style.
> Improve readibility.

That's three things in one patch :(

Please only do one thing per patch.

> 
> Signed-off-by: Thibaut Robert <thibaut.robert at gmail.com>
> ---
>  drivers/staging/gdm72xx/netlink_k.c | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/staging/gdm72xx/netlink_k.c b/drivers/staging/gdm72xx/netlink_k.c
> index 9d78bfc..31862e5 100644
> --- a/drivers/staging/gdm72xx/netlink_k.c
> +++ b/drivers/staging/gdm72xx/netlink_k.c
> @@ -71,10 +71,11 @@ static void netlink_rcv_cb(struct sk_buff *skb)
>  			if (dev) {
>  				rcv_cb(dev, nlh->nlmsg_type, msg, mlen);
>  				dev_put(dev);
> -			} else
> +			} else {
>  				netdev_err(skb->dev,
>  					   "dev_get_by_index(%d) is not found.\n",
>  					   ifindex);
> +			}
>  		} else {
>  			netdev_err(skb->dev, "Unregistered Callback\n");
>  		}
> @@ -120,9 +121,9 @@ int netlink_send(struct sock *sock, int group, u16 type, void *msg, int len)
>  	struct nlmsghdr *nlh;
>  	int ret = 0;
>  
> -	if (group > ND_MAX_GROUP) {
> -		pr_err("Group %d is invalied.\n", group);
> -		pr_err("Valid group is 0 ~ %d.\n", ND_MAX_GROUP);
> +	if (group < 0 || group > ND_MAX_GROUP) {

How can group be less than 0?

thanks,

greg k-h


More information about the devel mailing list