Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
[sfrench/cifs-2.6.git] / drivers / net / ethernet / qlogic / qed / qed_dcbx.c
index 8f6ccc0c39e5e8682aa7ac677f576b4cdd970d6f..fe7c1f230028343da3e06343b059bdd3e6f5f59a 100644 (file)
@@ -1277,11 +1277,10 @@ static struct qed_dcbx_get *qed_dcbnl_get_dcbx(struct qed_hwfn *hwfn,
 {
        struct qed_dcbx_get *dcbx_info;
 
-       dcbx_info = kmalloc(sizeof(*dcbx_info), GFP_ATOMIC);
+       dcbx_info = kzalloc(sizeof(*dcbx_info), GFP_ATOMIC);
        if (!dcbx_info)
                return NULL;
 
-       memset(dcbx_info, 0, sizeof(*dcbx_info));
        if (qed_dcbx_query_params(hwfn, dcbx_info, type)) {
                kfree(dcbx_info);
                return NULL;
@@ -2308,7 +2307,7 @@ static int qed_dcbnl_ieee_setapp(struct qed_dev *cdev, struct dcb_app *app)
 
        DP_VERBOSE(hwfn, QED_MSG_DCB, "selector = %d protocol = %d pri = %d\n",
                   app->selector, app->protocol, app->priority);
-       if (app->priority < 0 || app->priority >= QED_MAX_PFC_PRIORITIES) {
+       if (app->priority >= QED_MAX_PFC_PRIORITIES) {
                DP_INFO(hwfn, "Invalid priority %d\n", app->priority);
                return -EINVAL;
        }